Video errors should be instances of Error
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2017 17:38:28 +0000 (17:38 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2017 17:38:28 +0000 (17:38 +0000)
commitc5134013b5b29248e218f2d8935e68c7596aded7
tree07228e6525839aad6104ed8c4ff8448faa491a0a
parent7f5d0b3efd35757ae43a0585f46dccf3d73f8da1
Video errors should be instances of Error
https://bugs.webkit.org/show_bug.cgi?id=174573
<rdar://problem/34445494>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline tests now that output has changed slightly.

* web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt:

Source/WebCore:

Video errors should be instances of DOMException and Error as per:
- https://html.spec.whatwg.org/multipage/media.html#reject-pending-play-promises
- https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-2
- https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-3
- https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises-3
- https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises

No new tests, extended existing test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::noneSupported):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::pauseInternal):
* html/HTMLMediaElement.h:

LayoutTests:

* http/tests/security/video-cross-origin-caching-expected.txt:
Rebaseline test now that output has changed slightly.

* media/media-play-promise-reject-load-abort-expected.txt:
* media/media-play-promise-reject-load-abort.html:
Extend test coverage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/MediaStream-MediaElement-setObject-null-expected.txt
LayoutTests/http/tests/security/video-cross-origin-caching-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt
LayoutTests/media/media-play-promise-reject-load-abort-expected.txt
LayoutTests/media/media-play-promise-reject-load-abort.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h