зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1377480 - fix mda mochitest failure. r=smaug
This commit is contained in:
Родитель
4d2965266a
Коммит
c9afcc965e
|
@ -29,8 +29,8 @@ function finish(v) {
|
|||
|
||||
function onload() {
|
||||
info("iframe loaded");
|
||||
var v = document.body.getElementsByTagName("iframe")[0]
|
||||
.contentDocument.body.getElementsByTagName("video")[0];
|
||||
var v = SpecialPowers.wrap(document.body.getElementsByTagName("iframe")[0])
|
||||
.contentDocument.body.getElementsByTagName("video")[0];
|
||||
|
||||
// Got 'error' as expected, finish the test.
|
||||
if (v.error) {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html><script>
|
||||
var context = new AudioContext();
|
||||
setTimeout(function(){window.close();},1000);</script></html>
|
|
@ -11,6 +11,7 @@ support-files =
|
|||
audiovideo.mp4
|
||||
audioBufferSourceNodeDetached_worker.js
|
||||
corsServer.sjs
|
||||
file_nodeCreationDocumentGone.html
|
||||
invalid.txt
|
||||
layouttest-glue.js
|
||||
noaudio.webm
|
||||
|
|
|
@ -12,11 +12,7 @@
|
|||
SimpleTest.requestCompleteLog();
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var sub = encodeURI("data:text/html,<!DOCTYPE html>\n"+
|
||||
"<html><script>"+
|
||||
"var context = new AudioContext();"+
|
||||
"setTimeout(function(){window.close();},1000);\x3C/script></html>");
|
||||
var a = window.open(sub);
|
||||
var a = window.open("file_nodeCreationDocumentGone.html");
|
||||
a.onbeforeunload = function() {
|
||||
setTimeout(function(){
|
||||
try {
|
||||
|
|
|
@ -58,7 +58,7 @@ function loadFrame(frameId) {
|
|||
frame.contentWindow.document.title = frameId;
|
||||
resolve(frame);
|
||||
});
|
||||
frame.src = 'data:text/html,' + encodeURI('<html><head></head><body></body></html>');
|
||||
frame.src = 'about:blank';
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -88,4 +88,4 @@ function testSynthState(win, expectedState) {
|
|||
is(win.speechSynthesis[attr], expectedState[attr],
|
||||
win.document.title + ": '" + attr + '" does not match');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,21 +3,11 @@
|
|||
<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>';
|
||||
location = "file_bfcache_frame2.html";
|
||||
});
|
||||
speechSynthesis.speak(u);
|
||||
});
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<html>
|
||||
<script>
|
||||
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);
|
||||
};
|
||||
</script>
|
||||
|
||||
<body onpageshow="frameUnloaded()"></body></html>
|
||||
|
|
@ -4,6 +4,7 @@ subsuite = media
|
|||
support-files =
|
||||
common.js
|
||||
file_bfcache_frame.html
|
||||
file_bfcache_frame2.html
|
||||
file_setup.html
|
||||
file_speech_queue.html
|
||||
file_speech_simple.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче