Title: [100282] trunk/LayoutTests
- Revision
- 100282
- Author
- eric.carl...@apple.com
- Date
- 2011-11-15 08:14:39 -0800 (Tue, 15 Nov 2011)
Log Message
media-blocked-by-willsendrequest.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=72381
Reviewed by Tony Gentilcore.
* media/media-blocked-by-willsendrequest.html:
Don't assume the media events will be dispatched before the window 'load' event.
* platform/chromium/test_expectations.txt:
Don't skip media/media-blocked-by-willsendrequest.html.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (100281 => 100282)
--- trunk/LayoutTests/ChangeLog 2011-11-15 15:59:33 UTC (rev 100281)
+++ trunk/LayoutTests/ChangeLog 2011-11-15 16:14:39 UTC (rev 100282)
@@ -1,3 +1,15 @@
+2011-11-15 Eric Carlson <eric.carl...@apple.com>
+
+ media-blocked-by-willsendrequest.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=72381
+
+ Reviewed by Tony Gentilcore.
+
+ * media/media-blocked-by-willsendrequest.html:
+ Don't assume the media events will be dispatched before the window 'load' event.
+ * platform/chromium/test_expectations.txt:
+ Don't skip media/media-blocked-by-willsendrequest.html.
+
2011-11-15 Zoltan Arvai <zar...@inf.u-szeged.hu>
[Qt] Enable skipped but now passing tests (http/tests)
Modified: trunk/LayoutTests/media/media-blocked-by-willsendrequest.html (100281 => 100282)
--- trunk/LayoutTests/media/media-blocked-by-willsendrequest.html 2011-11-15 15:59:33 UTC (rev 100281)
+++ trunk/LayoutTests/media/media-blocked-by-willsendrequest.html 2011-11-15 16:14:39 UTC (rev 100282)
@@ -10,27 +10,42 @@
and does not block the document's 'load' event.</p>
<script>
+ var events = [];
+
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setWillSendRequestReturnsNull(true);
} else
- consoleWrite("This test can only be run in DumpRenderTree!<br><br>");
+ consoleWrite("<b><em>This test can only be run in DumpRenderTree!</em></b><br><br>");
- function loaded()
+ function finish()
{
+ consoleWrite("EVENT(loadstart)");
+ consoleWrite("EVENT(error)");
testExpected("video.error", null, "!=");
testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
consoleWrite("");
endTest();
};
-
- window._onload_ = loaded;
+ function handleEvent(evt)
+ {
+ // Wait until all three events we listen for have been received before testing.
+ // Media events are dispatched asynchronously so we can't assume they will fire
+ // before window.onload.
+ if (events.indexOf(evt.type) == -1)
+ events.push(evt.type);
+ if (events.length == 3)
+ finish();
+ }
+
findMediaElement();
- waitForEvent("loadstart");
- waitForEvent("error");
+ window.addEventListener('load', handleEvent);
+ video.addEventListener('loadstart', handleEvent);
+ video.addEventListener('error', handleEvent);
+
testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY);
consoleWrite("");
var mediaFile = findMediaFile("video", "content/test");
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (100281 => 100282)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-11-15 15:59:33 UTC (rev 100281)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-11-15 16:14:39 UTC (rev 100282)
@@ -3896,5 +3896,3 @@
BUGWK59771 WIN : http/tests/inspector/resource-tree/resource-tree-frame-add.html = TIMEOUT PASS
BUGWK72376 WIN : fast/forms/file/input-file-label.html = TEXT PASS
-
-BUGWK72381 : media/media-blocked-by-willsendrequest.html = TEXT PASS
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes