Bug 524006 - toolkit/content/tests/widgets/test_videocontrols_audio_direction.html fails on Windows debug builds
--- 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);