-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GStreamer] Invalid command line error when visiting www.chessbase.com
https://bugs.webkit.org/show_bug.cgi?id=124715 Reviewed by Philippe Normand. Source/WebCore: We were not handling the HTTP errors in the WebKit GStreamer source and therefore the 404 error page was being 'decoded'. As no decoder could be found (for obvious reasons), playback failed, but it should be failing for the source not being found instead of the decoding problem. Test: http/tests/media/video-error-does-not-exist.html * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::handleResponseReceived): Handle HTTP errors in the source and raise a GStreamer error to the pipeline. LayoutTests: Copied and adapted for HTTP from media/video-error-does-not-exist.html. * http/tests/media/video-error-does-not-exist-expected.txt: Added. * http/tests/media/video-error-does-not-exist.html: Added. Canonical link: https://commits.webkit.org/143061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
LayoutTests/http/tests/media/video-error-does-not-exist-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Test that the media element is in correct state after load fails from HTTP. | ||
|
||
|
||
|
||
EXPECTED (video.error == 'null') OK | ||
|
||
EVENT(error) | ||
EXPECTED (video.error != 'null') OK | ||
EXPECTED (video.error.code == '4') OK | ||
EXPECTED (video.networkState == '3') OK | ||
EXPECTED (isNaN(video.duration) == 'true') OK | ||
EXPECTED (video.currentTime == '0') OK | ||
EXPECTED (video.buffered.length == '0') OK | ||
EXPECTED (video.seekable.length == '0') OK | ||
EXPECTED (video.buffered.length == '0') OK | ||
END OF TEST | ||
|
28 changes: 28 additions & 0 deletions
28
LayoutTests/http/tests/media/video-error-does-not-exist.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<p>Test that the media element is in correct state after load fails from HTTP.</p> | ||
<video controls></video> | ||
<script src=../../media-resources/video-test.js></script> | ||
<script src=../../media-resources/media-file.js></script> | ||
<script> | ||
|
||
consoleWrite(""); | ||
testExpected("video.error", null); | ||
|
||
waitForEventAndTest("canplaythrough", "false"); | ||
|
||
waitForEvent("error", function () { | ||
testExpected("video.error", null, "!="); | ||
testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED); | ||
|
||
testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE); | ||
|
||
testExpected("isNaN(video.duration)", true); | ||
testExpected("video.currentTime", 0); | ||
testExpected("video.buffered.length", 0); | ||
testExpected("video.seekable.length", 0); | ||
testExpected("video.buffered.length", 0); | ||
endTest(); | ||
}); | ||
|
||
video.src = "http://127.0.0.1:8000/does-not-exist.mpeg"; | ||
consoleWrite(""); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters