Rebaseline and enable media/modern-media-controls/controls-visibility-support
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:40:43 +0000 (17:40 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:40:43 +0000 (17:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173060
<rdar://problem/32616840>

Reviewed by Eric Carlson.

We only check the "visible" property on the MediaControls instance which is the only thing being
set by this class now. We also fix entering fullscreen by not using a <button> element which has
some default styles set by the Button class. Finally, we make some videoTracks.length assertions
asynchronous to avoid timing issues.

* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217892 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac/TestExpectations

index 2e1b350..791b5f9 100644 (file)
@@ -1,5 +1,33 @@
 2017-06-07  Antoine Quint  <graouts@apple.com>
 
+        Rebaseline and enable media/modern-media-controls/controls-visibility-support
+        https://bugs.webkit.org/show_bug.cgi?id=173060
+        <rdar://problem/32616840>
+
+        Reviewed by Eric Carlson.
+
+        We only check the "visible" property on the MediaControls instance which is the only thing being
+        set by this class now. We also fix entering fullscreen by not using a <button> element which has
+        some default styles set by the Button class. Finally, we make some videoTracks.length assertions
+        asynchronous to avoid timing issues.
+
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt:
+        * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html:
+
+2017-06-07  Antoine Quint  <graouts@apple.com>
+
         Rebaseline and enable media/modern-media-controls/buttons-container
         https://bugs.webkit.org/show_bug.cgi?id=173059
         <rdar://problem/32616156>
index 54aa81a..8a48ecf 100644 (file)
@@ -4,12 +4,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Media has not begun loading yet
-PASS mediaController.controls.controlsBar.visible is false
-PASS mediaController.controls.startButton.visible is false
+PASS mediaController.controls.visible is false
 
 Media has loaded metadata
-PASS mediaController.controls.controlsBar.visible is false
-PASS mediaController.controls.startButton.visible is false
+PASS mediaController.controls.visible is false
 
 PASS successfullyParsed is true
 
index c494db6..b2d5dad 100644 (file)
@@ -14,14 +14,12 @@ const media = document.querySelector("audio");
 const mediaController = createControls(shadowRoot, media, null);
 
 debug("Media has not begun loading yet");
-shouldBeFalse("mediaController.controls.controlsBar.visible");
-shouldBeFalse("mediaController.controls.startButton.visible");
+shouldBeFalse("mediaController.controls.visible");
 
 media.addEventListener("loadedmetadata", function() {
     debug("");
     debug("Media has loaded metadata");
-    shouldBeFalse("mediaController.controls.controlsBar.visible");
-    shouldBeFalse("mediaController.controls.startButton.visible");
+    shouldBeFalse("mediaController.controls.visible");
     debug("");
     shadowRoot.host.remove();
     media.remove();
index 041ee61..3c83377 100644 (file)
@@ -4,12 +4,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Media has not begun loading yet
-PASS mediaController.controls.controlsBar.visible is false
-PASS mediaController.controls.startButton.visible is false
+PASS mediaController.controls.visible is false
 
 Media has loaded metadata
-PASS mediaController.controls.controlsBar.visible is false
-PASS mediaController.controls.startButton.visible is false
+PASS mediaController.controls.visible is false
 
 PASS successfullyParsed is true
 
index e939caf..2f9c7f3 100644 (file)
@@ -14,14 +14,12 @@ const media = document.querySelector("video");
 const mediaController = createControls(shadowRoot, media, null);
 
 debug("Media has not begun loading yet");
-shouldBeFalse("mediaController.controls.controlsBar.visible");
-shouldBeFalse("mediaController.controls.startButton.visible");
+shouldBeFalse("mediaController.controls.visible");
 
 media.addEventListener("loadedmetadata", function() {
     debug("");
     debug("Media has loaded metadata");
-    shouldBeFalse("mediaController.controls.controlsBar.visible");
-    shouldBeFalse("mediaController.controls.startButton.visible");
+    shouldBeFalse("mediaController.controls.visible");
     debug("");
     shadowRoot.host.remove();
     media.remove();
index 88f4357..78b8505 100644 (file)
@@ -4,12 +4,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Media has not begun loading yet
-PASS mediaController.controls.controlsBar.visible is true
-PASS mediaController.controls.startButton.visible is true
+PASS mediaController.controls.visible is true
 
 Media has loaded metadata
-PASS mediaController.controls.controlsBar.visible is true
-PASS mediaController.controls.startButton.visible is true
+PASS mediaController.controls.visible is true
 
 PASS successfullyParsed is true
 
index 8945656..154f2b8 100644 (file)
@@ -14,14 +14,12 @@ const media = document.querySelector("audio");
 const mediaController = createControls(shadowRoot, media, null);
 
 debug("Media has not begun loading yet");
-shouldBeTrue("mediaController.controls.controlsBar.visible");
-shouldBeTrue("mediaController.controls.startButton.visible");
+shouldBeTrue("mediaController.controls.visible");
 
 media.addEventListener("loadedmetadata", function() {
     debug("");
     debug("Media has loaded metadata");
-    shouldBeTrue("mediaController.controls.controlsBar.visible");
-    shouldBeTrue("mediaController.controls.startButton.visible");
+    shouldBeTrue("mediaController.controls.visible");
     debug("");
     shadowRoot.host.remove();
     media.remove();
index 0673eb3..48873b0 100644 (file)
@@ -5,9 +5,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Media has loaded metadata
-PASS media.videoTracks.length is 1
-PASS mediaController.controls.controlsBar.visible is true
-PASS mediaController.controls.startButton.visible is true
+PASS media.videoTracks.length became 1
+PASS mediaController.controls.visible is true
 
 PASS successfullyParsed is true
 
index e96aad4..520dc81 100644 (file)
@@ -16,13 +16,13 @@ const mediaController = createControls(shadowRoot, media, null);
 media.addEventListener("loadedmetadata", function() {
     debug("");
     debug("Media has loaded metadata");
-    shouldBe("media.videoTracks.length", "1");
-    shouldBeTrue("mediaController.controls.controlsBar.visible");
-    shouldBeTrue("mediaController.controls.startButton.visible");
-    debug("");
-    shadowRoot.host.remove();
-    media.remove();
-    finishJSTest();
+    shouldBecomeEqual("media.videoTracks.length", "1", () => {
+        shouldBeTrue("mediaController.controls.visible");
+        debug("");
+        shadowRoot.host.remove();
+        media.remove();
+        finishJSTest();
+    });
 });
 
 </script>
index df827f6..19de7b2 100644 (file)
@@ -5,17 +5,14 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Media has loaded metadata
-PASS media.videoTracks.length is 1
-PASS mediaController.controls.controlsBar.visible is true
-PASS mediaController.controls.startButton.visible is true
+PASS media.videoTracks.length became 1
+PASS mediaController.controls.visible is true
 
 Turning controls off
-PASS mediaController.controls.controlsBar.visible is false
-PASS mediaController.controls.startButton.visible is false
+PASS mediaController.controls.visible is false
 
 Turning controls back on
-PASS mediaController.controls.controlsBar.visible is true
-PASS mediaController.controls.startButton.visible is true
+PASS mediaController.controls.visible is true
 
 PASS successfullyParsed is true
 
index b85fc79..0410b87 100644 (file)
@@ -18,15 +18,13 @@ new MutationObserver(() => {
     numberOfMutations++;
 
     if (numberOfMutations === 1) {
-        shouldBeFalse("mediaController.controls.controlsBar.visible");
-        shouldBeFalse("mediaController.controls.startButton.visible");
+        shouldBeFalse("mediaController.controls.visible");
 
         debug("");
         debug("Turning controls back on");
         media.controls = true;
     } else {
-        shouldBeTrue("mediaController.controls.controlsBar.visible");
-        shouldBeTrue("mediaController.controls.startButton.visible");
+        shouldBeTrue("mediaController.controls.visible");
 
         debug("");
         shadowRoot.host.remove();
@@ -38,13 +36,13 @@ new MutationObserver(() => {
 media.addEventListener("loadedmetadata", function() {
     debug("");
     debug("Media has loaded metadata");
-    shouldBe("media.videoTracks.length", "1");
-    shouldBeTrue("mediaController.controls.controlsBar.visible");
-    shouldBeTrue("mediaController.controls.startButton.visible");
+    shouldBecomeEqual("media.videoTracks.length", "1", () => {
+        shouldBeTrue("mediaController.controls.visible");
 
-    debug("");
-    debug("Turning controls off");
-    media.controls = false;
+        debug("");
+        debug("Turning controls off");
+        media.controls = false;
+    });
 });
 
 </script>
index dbcbe66..6742557 100644 (file)
@@ -5,7 +5,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS document.webkitFullscreenElement is document.documentElement
 PASS media.webkitDisplayingFullscreen is false
-PASS mediaController.controls.controlsBar.visible is false
+PASS mediaController.controls.visible is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
index ef02148..0849c8a 100644 (file)
@@ -18,14 +18,16 @@ media.addEventListener("play", () => {
     document.documentElement.addEventListener("webkitfullscreenchange", () => {
         shouldBe("document.webkitFullscreenElement", "document.documentElement");
         shouldBeFalse("media.webkitDisplayingFullscreen");
-        shouldBeFalse("mediaController.controls.controlsBar.visible");
+        shouldBeFalse("mediaController.controls.visible");
         button.remove();
         container.remove();
         media.remove();
         finishJSTest();
     });
 
-    const button = document.body.appendChild(document.createElement("button"));
+    const button = document.body.appendChild(document.createElement("div"));
+    button.setAttribute("style", "position: absolute; left: 0; top: 0;");
+    button.innerText = "Enter fullscreen";
     button.addEventListener("click", () => document.documentElement.webkitRequestFullscreen());
     pressOnElement(button);
 });
index 2964fdc..2dfa21f 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS media.webkitDisplayingFullscreen is true
-PASS mediaController.controls.controlsBar.visible is true
+PASS mediaController.controls.visible is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 9d4ba48..d06a08c 100644 (file)
@@ -17,14 +17,16 @@ const mediaController = createControls(container, media, null);
 media.addEventListener("play", () => {
     media.addEventListener("webkitfullscreenchange", () => {
         shouldBeTrue("media.webkitDisplayingFullscreen");
-        shouldBeTrue("mediaController.controls.controlsBar.visible");
+        shouldBeTrue("mediaController.controls.visible");
         button.remove();
         container.remove();
         media.remove();
         finishJSTest();
     });
 
-    const button = document.body.appendChild(document.createElement("button"));
+    const button = document.body.appendChild(document.createElement("div"));
+    button.setAttribute("style", "position: absolute; left: 0; top: 0;");
+    button.innerText = "Enter fullscreen";
     button.addEventListener("click", () => media.webkitEnterFullscreen());
     pressOnElement(button);
 });
index 8a7597f..3f7c6fa 100644 (file)
@@ -61,6 +61,7 @@ media/modern-media-controls/audio [ Pass ]
 media/modern-media-controls/background-tint [ Pass ]
 media/modern-media-controls/button [ Pass ]
 media/modern-media-controls/buttons-container [ Pass ]
+media/modern-media-controls/controls-visibility-support [ Pass ]
 
 # AirPlay cannot be tested on iOS
 webkit.org/b/166062 media/modern-media-controls/airplay-support [ Skip ]
@@ -70,6 +71,10 @@ webkit.org/b/166062 media/modern-media-controls/audio/audio-controls-buttons.htm
 media/modern-media-controls/button/button.html [ Skip ]
 media/modern-media-controls/button/button-active-state.html [ Skip ]
 
+# These tests rely on fullscreen which do not use the WebKit media controls on iOS
+media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html [ Skip ]
+media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html [ Skip ]
+
 webkit.org/b/172965 media/track/track-cue-overlap-snap-to-lines-not-set.html [ Failure ]
 
 webkit.org/b/156718 storage/websql/alter-to-info-table.html [ Failure ]
index 90e9c67..b87c686 100644 (file)
@@ -1556,6 +1556,7 @@ media/modern-media-controls/audio [ Pass ]
 media/modern-media-controls/background-tint [ Pass ]
 media/modern-media-controls/button [ Pass ]
 media/modern-media-controls/buttons-container [ Pass ]
+media/modern-media-controls/controls-visibility-support [ Pass ]
 media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html [ Pass ]
 media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html [ Pass ]
 media/modern-media-controls/volume-up-support [ Pass ]