[Modern Media Controls] Media Controller: set status label according to media state
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2016 22:34:48 +0000 (22:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2016 22:34:48 +0000 (22:34 +0000)
commit19929cb058a463366f44af7d4a8ef077843f364f
treeceb05650602bdfd8bcf4503df119e65e11bd6005
parent495dcc48879e001fbc51f49877d4ec845502675d
[Modern Media Controls] Media Controller: set status label according to media state
https://bugs.webkit.org/show_bug.cgi?id=164557
<rdar://problem/29184097>

Patch by Antoine Quint <graouts@apple.com> on 2016-11-09
Reviewed by Dean Jackson.

Source/WebCore:

Correctly set the StatusLabel text based on the media loading and network state.

Tests: http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html
       http/tests/media/modern-media-controls/status-support/status-support-loading.html
       media/modern-media-controls/status-support/status-support-error.html

* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/media/media-controller.js:
(MediaController):
* Modules/modern-media-controls/media/status-support.js: Added.
(StatusSupport.prototype.get control):
(StatusSupport.prototype.get mediaEvents):
(StatusSupport.prototype.syncControl):
(StatusSupport):
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Add new tests to check that we display the expected StatusLabel text when the media is in the
"Loading", "Error" and "Live Broadcast" states.

* http/tests/media/modern-media-controls/status-support/status-support-live-broadcast-expected.txt: Added.
* http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html: Added.
* http/tests/media/modern-media-controls/status-support/status-support-loading-expected.txt: Added.
* http/tests/media/modern-media-controls/status-support/status-support-loading.html: Added.
* media/modern-media-controls/status-support/status-support-error-expected.txt: Added.
* media/modern-media-controls/status-support/status-support-error.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/modern-media-controls/status-support/status-support-live-broadcast-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html [new file with mode: 0644]
LayoutTests/http/tests/media/modern-media-controls/status-support/status-support-loading-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/modern-media-controls/status-support/status-support-loading.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/status-support/status-support-error-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/status-support/status-support-error.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/js-files
Source/WebCore/Modules/modern-media-controls/media/media-controller.js
Source/WebCore/Modules/modern-media-controls/media/status-support.js [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj