Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds; r=dolske (NPOTB)
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 10 Nov 2009 11:45:03 -0500
changeset 32853 ae99530573a9de1722cb3bf9c31a4b3c0c156a85
parent 32852 0e5b959c2153043e8d5f39d329548bcce1c61239
child 32854 6c82d7aee4153db4bd3b9bf6d134212b9c46b490
push id640
push usereakhgari@mozilla.com
push dateTue, 10 Nov 2009 19:53:30 +0000
reviewersdolske
bugs524006
milestone1.9.2b3pre
Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds; r=dolske (NPOTB)
toolkit/content/tests/widgets/videocontrols_direction-1-ref.html
toolkit/content/tests/widgets/videocontrols_direction-1a.html
toolkit/content/tests/widgets/videocontrols_direction-1b.html
toolkit/content/tests/widgets/videocontrols_direction-1c.html
toolkit/content/tests/widgets/videocontrols_direction-1d.html
toolkit/content/tests/widgets/videocontrols_direction-1e.html
toolkit/content/tests/widgets/videocontrols_direction-2-ref.html
toolkit/content/tests/widgets/videocontrols_direction-2a.html
toolkit/content/tests/widgets/videocontrols_direction-2b.html
toolkit/content/tests/widgets/videocontrols_direction-2c.html
toolkit/content/tests/widgets/videocontrols_direction-2d.html
toolkit/content/tests/widgets/videocontrols_direction-2e.html
toolkit/content/tests/widgets/videocontrols_direction_test.js
--- a/toolkit/content/tests/widgets/videocontrols_direction-1-ref.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1-ref.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<video controls id="av" src="black.ogv"></video>
+<video controls autobuffer id="av" source="black.ogv"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-1a.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1a.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html dir="rtl">
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body>
-<video controls id="av" src="black.ogv"></video>
+<video controls autobuffer id="av" source="black.ogv"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-1b.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1b.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html style="direction: rtl">
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body>
-<video controls id="av" src="black.ogv"></video>
+<video controls autobuffer id="av" source="black.ogv"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-1c.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1c.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="direction: rtl">
-<video controls id="av" src="black.ogv"></video>
+<video controls autobuffer id="av" source="black.ogv"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-1d.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1d.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<video controls id="av" src="black.ogv" dir="rtl"></video>
+<video controls autobuffer id="av" source="black.ogv" dir="rtl"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-1e.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-1e.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<video controls id="av" src="black.ogv" style="direction: rtl;"></video>
+<video controls autobuffer id="av" source="black.ogv" style="direction: rtl;"></video>
 <div id="mask"></div>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2-ref.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2-ref.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<audio controls id="av" src="audio.oga"></audio>
+<audio controls autobuffer id="av" source="audio.oga"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2a.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2a.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html dir="rtl">
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body>
-<audio controls id="av" src="audio.oga"></audio>
+<audio controls autobuffer id="av" source="audio.oga"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2b.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2b.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html style="direction: rtl">
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body>
-<audio controls id="av" src="audio.oga"></audio>
+<audio controls autobuffer id="av" source="audio.oga"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2c.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2c.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="direction: rtl">
-<audio controls id="av" src="audio.oga"></audio>
+<audio controls autobuffer id="av" source="audio.oga"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2d.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2d.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<audio controls id="av" src="audio.oga" dir="rtl"></audio>
+<audio controls autobuffer id="av" source="audio.oga" dir="rtl"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction-2e.html
+++ b/toolkit/content/tests/widgets/videocontrols_direction-2e.html
@@ -1,9 +1,9 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="videomask.css">
 </head>
 <body style="text-align: right;">
-<audio controls id="av" src="audio.oga" style="direction: rtl;"></audio>
+<audio controls autobuffer id="av" source="audio.oga" style="direction: rtl;"></audio>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/videocontrols_direction_test.js
+++ b/toolkit/content/tests/widgets/videocontrols_direction_test.js
@@ -14,17 +14,24 @@ RemoteCanvas.prototype.compare = functio
 RemoteCanvas.prototype.load = function(callback) {
   var iframe = document.createElement("iframe");
   iframe.id = this.id + "-iframe";
   iframe.width = RemoteCanvas.CANVAS_WIDTH + "px";
   iframe.height = RemoteCanvas.CANVAS_HEIGHT + "px";
   iframe.src = this.url;
   var me = this;
   iframe.addEventListener("load", function() {
-    me.remotePageLoaded(callback);
+    var m = iframe.contentDocument.getElementById("av");
+    m.addEventListener("suspend", function(aEvent) {
+      if (aEvent.loaded == aEvent.total) {
+        m.removeEventListener("suspend", arguments.callee, false);
+        me.remotePageLoaded(callback);
+      }
+    }, false);
+    m.src = m.getAttribute("source");
   }, false);
   window.document.body.appendChild(iframe);
 };
 
 RemoteCanvas.prototype.remotePageLoaded = function(callback) {
   var ldrFrame = document.getElementById(this.id + "-iframe");
   this.snapshot = snapshotWindow(ldrFrame.contentWindow);
   this.snapshot.id = this.id + "-canvas";