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. 


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7e060099
2011-11-15 Eric Carlson <eric.carlson@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 <zarvai@inf.u-szeged.hu>
[Qt] Enable skipped but now passing tests (http/tests)
......@@ -10,26 +10,41 @@
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("");
......
......@@ -3896,5 +3896,3 @@ BUGWK72369 : media/track/track-webvtt-tc003-newlines.html = TEXT PASS
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment