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 34828 3dcf63a4435c419c9c397b4a123cecb2915b1973
parent 34827 e39e777f86bb75af028b386ee588160ff9a1a58e
child 34829 9cc489805b3e4c55e8cd5f4fe134e24b6bace10a
push id10286
push usereakhgari@mozilla.com
push dateFri, 13 Nov 2009 17:08:05 +0000
treeherdermozilla-central@3dcf63a4435c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs524006
milestone1.9.3a1pre
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);
         setTimeout(function() {
           me.remotePageLoaded(callback);
         }, 0);
       }
     }, false);
     m.src = m.getAttribute("source");
   }, false);