From 70e1d4c998b5b4e0d416677afbd722cdf198cb14 Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Fri, 24 Feb 2012 10:40:38 +0000 Subject: [PATCH] [Chromium] video-referer.html fails https://bugs.webkit.org/show_bug.cgi?id=79239 Fix error event race at startup and cleanup event code to take advantage of more succinct video-test.js functionality; such as waitForEventAndFail, etc. Since this test uses a element without a 'src' tag, an error event gets fired during load. If we don't wait until after the onload fires, we'll pickup this error we don't care about. Patch by Dale Curtis on 2012-02-24 Reviewed by Eric Carlson. * http/tests/media/video-referer-expected.txt: * http/tests/media/video-referer.html: * platform/chromium/test_expectations.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108762 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 19 +++++++++++++++++++ .../http/tests/media/video-referer-expected.txt | 1 + LayoutTests/http/tests/media/video-referer.html | 15 ++++----------- LayoutTests/platform/chromium/test_expectations.txt | 3 --- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 018d140..f453034 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,22 @@ +2012-02-24 Dale Curtis + + [Chromium] video-referer.html fails + https://bugs.webkit.org/show_bug.cgi?id=79239 + + Fix error event race at startup and cleanup event code to take + advantage of more succinct video-test.js functionality; such as + waitForEventAndFail, etc. + + Since this test uses a element without a 'src' tag, an error + event gets fired during load. If we don't wait until after the + onload fires, we'll pickup this error we don't care about. + + Reviewed by Eric Carlson. + + * http/tests/media/video-referer-expected.txt: + * http/tests/media/video-referer.html: + * platform/chromium/test_expectations.txt: + 2012-02-24 Nikolas Zimmermann Not reviewed. Update layout test results after r108699. diff --git a/LayoutTests/http/tests/media/video-referer-expected.txt b/LayoutTests/http/tests/media/video-referer-expected.txt index 574a8f8..64d9bcb 100644 --- a/LayoutTests/http/tests/media/video-referer-expected.txt +++ b/LayoutTests/http/tests/media/video-referer-expected.txt @@ -1,3 +1,4 @@ EVENT(canplay) +END OF TEST Tests that the media player will send the relevant referer when requesting the media file. diff --git a/LayoutTests/http/tests/media/video-referer.html b/LayoutTests/http/tests/media/video-referer.html index 69fedb2..09077f8 100644 --- a/LayoutTests/http/tests/media/video-referer.html +++ b/LayoutTests/http/tests/media/video-referer.html @@ -14,26 +14,19 @@ var frame = document.createElement('iframe'); frame.width = 0; frame.height = 0; - frame.src = "data:text/html,test"; frame.addEventListener('load', function () { - video = document.getElementById('video'); source = document.getElementById('source'); source.src = 'http://127.0.0.1:8000/media/resources/video-referer-check-referer.php?name=' + movie + '&type=' + type; source.type = type; + + waitForEventAndFail('error'); + waitForEventAndEnd('canplay'); video.load(); }); + frame.src = "data:text/html,test"; document.body.appendChild(frame); } - - waitForEventAndEnd('error', function () { - consoleWrite('FAIL, got error when loading media error: ' + video.error.code); - }); - - waitForEvent('canplay', function () { - if (window.layoutTestController) - window.layoutTestController.notifyDone(); - } ); Tests that the media player will send the relevant referer when requesting the media file.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt index f322a1f..e35bbb8 100644 --- a/LayoutTests/platform/chromium/test_expectations.txt +++ b/LayoutTests/platform/chromium/test_expectations.txt @@ -4202,9 +4202,6 @@ BUGCR115073 SLOW LINUX DEBUG : inspector/debugger/script-formatter-breakpoints.h BUGWK79224 VISTA WIN7 : fast/canvas/webgl/tex-image-with-format-and-type.html = TEXT -// Failing after test was updated in r108387, media engine sending incorrect referrer? -BUGWK79239 : http/tests/media/video-referer.html = FAIL - // Need rebaselining after bug 75091 BUGWK75091 SKIP : svg/carto.net/tabgroup.svg = FAIL BUGWK75091 SKIP : svg/carto.net/window.svg = FAIL -- 2.7.4