Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 13 Nov 2009 12:07:46 -0500
changeset 32935 6c6f2621732b6cfa738f23522a34e267de79c665
parent 32934 0417352b24d6a1d32057042996a9e9708d355d57
child 32936 acb7705af04774695ccb378fe8f7ab66b2fbc3fd
push id685
push usereakhgari@mozilla.com
push dateFri, 13 Nov 2009 20:55:05 +0000
bugs524006
milestone1.9.2b3pre
Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds
toolkit/content/tests/widgets/videocontrols_direction_test.js
--- a/toolkit/content/tests/widgets/videocontrols_direction_test.js
+++ b/toolkit/content/tests/widgets/videocontrols_direction_test.js
@@ -16,17 +16,18 @@ RemoteCanvas.prototype.load = function(c
   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() {
     var m = iframe.contentDocument.getElementById("av");
     m.addEventListener("suspend", function(aEvent) {
-      if (aEvent.loaded == aEvent.total) {
+      if (m.readyState == m.HAVE_ENOUGH_DATA &&
+          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);
 };