зеркало из https://github.com/mozilla/pjs.git
Bug 680275 - Ensure that the video load begins before adding the video to a new document. r=roc
This commit is contained in:
Родитель
eef8ec2034
Коммит
0d1ce63191
|
@ -96,14 +96,16 @@ v.load();
|
||||||
// Load and move to another document.
|
// Load and move to another document.
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
v = createVideo(test.name, test.type, "4");
|
v = createVideo(test.name, test.type, "4");
|
||||||
v.load(); // load started while in this document, this doc's load will block until
|
v.onloadstart = function(e) {
|
||||||
// the video's finished loading (in the other document).
|
|
||||||
// Opening a new window to do this is a bit annoying, but if we use an iframe here,
|
// Opening a new window to do this is a bit annoying, but if we use an iframe here,
|
||||||
// delaying of the iframe's load event might interfere with the firing of our load event
|
// delaying of the iframe's load event might interfere with the firing of our load event
|
||||||
// in some confusing way. So it's simpler just to open another window.
|
// in some confusing way. So it's simpler just to open another window.
|
||||||
var w = window.open("", "testWindow", "width=400,height=400");
|
var w = window.open("", "testWindow", "width=400,height=400");
|
||||||
w.document.body.appendChild(v);
|
w.document.body.appendChild(v);
|
||||||
testWindows.push(w);
|
testWindows.push(w);
|
||||||
|
};
|
||||||
|
v.load(); // load started while in this document, this doc's load will block until
|
||||||
|
// the video's finished loading (in the other document).
|
||||||
|
|
||||||
if (gRegisteredElements.length > 0) {
|
if (gRegisteredElements.length > 0) {
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче