Title: [189401] trunk
Revision
189401
Author
[email protected]
Date
2015-09-04 16:50:17 -0700 (Fri, 04 Sep 2015)

Log Message

[mediacontrols] Test AirPlay picker button
https://bugs.webkit.org/show_bug.cgi?id=148836

Reviewed by Dean Jackson.

Source/WebCore:

Test: media/controls/airplay-picker.html

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.getCurrentControlsStatus.elements.forEach.):
(Controller.prototype.getCurrentControlsStatus):

LayoutTests:

* media/controls/airplay-picker-expected.txt: New test.
* media/controls/airplay-picker.html: New results.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189400 => 189401)


--- trunk/LayoutTests/ChangeLog	2015-09-04 23:48:58 UTC (rev 189400)
+++ trunk/LayoutTests/ChangeLog	2015-09-04 23:50:17 UTC (rev 189401)
@@ -1,3 +1,13 @@
+2015-09-04  Eric Carlson  <[email protected]>
+
+        [mediacontrols] Test AirPlay picker button
+        https://bugs.webkit.org/show_bug.cgi?id=148836
+
+        Reviewed by Dean Jackson.
+
+        * media/controls/airplay-picker-expected.txt: New test.
+        * media/controls/airplay-picker.html: New results.
+
 2015-09-04  Beth Dakin  <[email protected]>
 
         Should have a test to make sure links don't navigate after a cancelled force 

Added: trunk/LayoutTests/media/controls/airplay-picker-expected.txt (0 => 189401)


--- trunk/LayoutTests/media/controls/airplay-picker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/controls/airplay-picker-expected.txt	2015-09-04 23:50:17 UTC (rev 189401)
@@ -0,0 +1,17 @@
+This tests for the wireless device picker icon.
+
+This test only runs in DRT!
+
+
+EVENT: canplaythrough
+PASS: We are using the apple idiom
+
+Get the wireless device picker button
+
+PASS: Name is 'AppleTV Device Picker'
+PASS: Has hidden class
+PASS: CSS display: none
+PASS: Aria label is 'Choose Wireless Display'
+
+Testing finished.
+

Added: trunk/LayoutTests/media/controls/airplay-picker.html (0 => 189401)


--- trunk/LayoutTests/media/controls/airplay-picker.html	                        (rev 0)
+++ trunk/LayoutTests/media/controls/airplay-picker.html	2015-09-04 23:50:17 UTC (rev 189401)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script src=""
+        <script src=""
+        <script>
+            var tester = new ControlsTest()
+                .whenReady(runTests)
+                .start();
+
+            function runTests()
+            {
+                var currentState = tester.currentState;
+                tester.test("We are using the apple idiom")
+                    .value(currentState.idiom)
+                    .isEqualTo("apple");
+
+                tester.startNewSection("Get the wireless device picker button");
+                var statusState = tester.stateForControlsElement("AppleTV Device Picker");
+
+                tester.test("Name is 'AppleTV Device Picker'")
+                    .value(statusState.name)
+                    .isEqualTo("AppleTV Device Picker");
+
+                tester.test("Has hidden class")
+                    .value(statusState.className)
+                    .isEqualTo("hidden");
+
+                tester.test("CSS display: none")
+                    .value(statusState.computedStyle.display)
+                    .isEqualTo("none");
+
+                tester.test("Aria label is 'Choose Wireless Display'")
+                    .value(statusState.ariaLabel)
+                    .isEqualTo("Choose Wireless Display");
+
+                tester.end();
+            }
+
+        </script>
+    </head>
+    <body>
+        <p>This tests for the wireless device picker icon.</p>
+        <p>This test only runs in DRT!</p>
+        <video controls></video>
+    </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (189400 => 189401)


--- trunk/Source/WebCore/ChangeLog	2015-09-04 23:48:58 UTC (rev 189400)
+++ trunk/Source/WebCore/ChangeLog	2015-09-04 23:50:17 UTC (rev 189401)
@@ -1,3 +1,16 @@
+2015-09-04  Eric Carlson  <[email protected]>
+
+        [mediacontrols] Test AirPlay picker button
+        https://bugs.webkit.org/show_bug.cgi?id=148836
+
+        Reviewed by Dean Jackson.
+
+        Test: media/controls/airplay-picker.html
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.getCurrentControlsStatus.elements.forEach.):
+        (Controller.prototype.getCurrentControlsStatus):
+
 2015-09-04  Chris Dumez  <[email protected]>
 
         dispatchEvent() should throw an InvalidStateError if the event's initialized flag is not set

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (189400 => 189401)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-09-04 23:48:58 UTC (rev 189400)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-09-04 23:50:17 UTC (rev 189401)
@@ -2132,7 +2132,13 @@
             {
                 name: "Fullscreen Button",
                 object: this.controls.fullscreenButton
-            }
+            },
+            {
+                name: "AppleTV Device Picker",
+                object: this.controls.wirelessTargetPicker,
+                styleValues: ["display"],
+                extraProperties: ["hidden"],
+            },
         ];
 
         elements.forEach(function (element) {
@@ -2150,6 +2156,7 @@
 
             element.bounds = obj.getBoundingClientRect();
             element.className = obj.className;
+            element.ariaLabel = obj.getAttribute('aria-label');
 
             if (element.extraProperties) {
                 element.extraProperties.forEach(function (property) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to