Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds; r=dolske
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 10 Nov 2009 11:45:03 -0500
changeset 34736 25138a08de155f991b85148f3e4c6818168bc980
parent 34735 18afb618437cb58686a8ebe0397009a140c2e655
child 34737 3c13dfd53b5902250a75194c1734029fc223c476
push id10214
push usereakhgari@mozilla.com
push dateTue, 10 Nov 2009 16:45:31 +0000
treeherdermozilla-central@25138a08de15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs524006
milestone1.9.3a1pre
Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds; r=dolske
toolkit/content/tests/widgets/Makefile.in
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/Makefile.in
+++ b/toolkit/content/tests/widgets/Makefile.in
@@ -106,16 +106,18 @@ include $(topsrcdir)/config/rules.mk
 		test_focus_anons.xul \
 		test_tabindex.xul \
 		test_mousescroll.xul \
 		test_scrollbar.xul \
 		test_sorttemplate.xul \
 		test_contextmenu_list.xul \
 		test_videocontrols.html \
 		test_richlist_direction.xul \
+		test_videocontrols_video_direction.html \
+		test_videocontrols_audio_direction.html \
 		videocontrols_direction-1-ref.html \
 		videocontrols_direction-1a.html \
 		videocontrols_direction-1b.html \
 		videocontrols_direction-1c.html \
 		videocontrols_direction-1d.html \
 		videocontrols_direction-1e.html \
 		videocontrols_direction-2-ref.html \
 		videocontrols_direction-2a.html \
@@ -126,19 +128,15 @@ include $(topsrcdir)/config/rules.mk
 		videocontrols_direction_test.js \
 		use_large_cache.js \
 		audio.oga \
 		black.ogv \
 		video.ogg \
 		videomask.css \
 		$(NULL)
 
-# Disabled for now -- see bug 501754
-#		test_videocontrols_video_direction.html \
-#		test_videocontrols_audio_direction.html \
-
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 _TEST_FILES += test_menubar.xul \
                window_menubar.xul
 endif
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- 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";