[mediacontrols] Test the ordering of elements in the controls panel
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 18:12:21 +0000 (18:12 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 18:12:21 +0000 (18:12 +0000)
commit923645356f9d43e1616a8ab80e67f05c666e9d92
tree086610ee4e12447d954c9abd7dff9fb226c544b8
parent6044233a1a8dc8a73a9b52751ce2937add37a17f
[mediacontrols] Test the ordering of elements in the controls panel
https://bugs.webkit.org/show_bug.cgi?id=148804
<rdar://problem/22579232>

Reviewed by Eric Carlson.

Source/WebCore:

Add information about various controls elements to the status object.

Test: media/controls/elementOrder.html

* Modules/mediacontrols/mediaControlsApple.js:

LayoutTests:

Add a new test that checks the visual order of the buttons and
elements in the controls panel. This is helpful because they
are not necessarily in that order within the DOM.

I also added caching of the current state to the testing helper,
to save generating the JSON status multiple times in subsequent
calls.

* media/controls/elementOrder.html: New test.
* media/controls/elementOrder-expected.txt: New results.
* media/controls/controls-test-helpers.js:
(ControlsTest):
(ControlsTest.prototype.get currentState): Added caching.
(ControlsTest.prototype.stateForControlsElement):
(ControlsTest.prototype.isGreaterThan): New test helper.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/controls/controls-test-helpers.js
LayoutTests/media/controls/elementOrder-expected.txt [new file with mode: 0644]
LayoutTests/media/controls/elementOrder.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js