Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds; r=dolske (NPOTB)
☠☠ backed out by d89ca352b319 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 10 Nov 2009 11:45:03 -0500
changeset 26570 645622c570fbee3b66ad2fa93202238664414feb
parent 26569 a42d516d6d72122643b3d2b7eec03cc572d1dcd6
child 26571 672c7b2cf96811a1d9fb190d73a40ce024f6fd11
push id2114
push usereakhgari@mozilla.com
push dateTue, 10 Nov 2009 23:40:04 +0000
reviewersdolske
bugs524006
milestone1.9.1.6pre
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";