diff options
Diffstat (limited to 'dom/media/webspeech/synth/test/file_bfcache_frame.html')
-rw-r--r-- | dom/media/webspeech/synth/test/file_bfcache_frame.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dom/media/webspeech/synth/test/file_bfcache_frame.html b/dom/media/webspeech/synth/test/file_bfcache_frame.html new file mode 100644 index 000000000..c8663b7fb --- /dev/null +++ b/dom/media/webspeech/synth/test/file_bfcache_frame.html @@ -0,0 +1,28 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <script type="application/javascript"> + var frameUnloaded = function() { + var u = new SpeechSynthesisUtterance('hi'); + u.addEventListener('end', function () { + parent.ok(true, 'Successfully spoke utterance from new frame.'); + parent.onDone(); + }); + speechSynthesis.speak(u); + } + addEventListener('pageshow', function onshow(evt) { + var u = new SpeechSynthesisUtterance('hello'); + u.lang = 'it-IT-noend'; + u.addEventListener('start', function() { + location = + 'data:text/html,<html><body onpageshow="' + + frameUnloaded.toSource() + '()"></body></html>'; + }); + speechSynthesis.speak(u); + }); + </script> +</head> +<body> +</body> +</html> |