Title: [227953] trunk/LayoutTests
Revision
227953
Author
grao...@webkit.org
Date
2018-01-31 23:12:09 -0800 (Wed, 31 Jan 2018)

Log Message

[Modern Media Controls] Turn media/modern-media-controls/macos-inline-media-controls back on
https://bugs.webkit.org/show_bug.cgi?id=182338

Reviewed by Eric Carlson.

Update tests to match the modern-media-controls designs and expectations. Certain tests didn't make any sense anymore
and were removed, for instance tests related to the compact mode.

* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (227952 => 227953)


--- trunk/LayoutTests/ChangeLog	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/ChangeLog	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,3 +1,44 @@
+2018-01-31  Antoine Quint  <grao...@apple.com>
+
+        [Modern Media Controls] Turn media/modern-media-controls/macos-inline-media-controls back on
+        https://bugs.webkit.org/show_bug.cgi?id=182338
+
+        Reviewed by Eric Carlson.
+
+        Update tests to match the modern-media-controls designs and expectations. Certain tests didn't make any sense anymore
+        and were removed, for instance tests related to the compact mode.
+
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html: Removed.
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2018-01-31  Per Arne Vollan  <pvol...@apple.com>
 
         Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,12 +0,0 @@
-Testing that we show a gray background for macOS audio elements.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS mediaControls.querySelector('.controls-bar') instanceof HTMLDivElement became true
-PASS getComputedStyle(mediaControls.querySelector('.controls-bar')).backgroundColor is "rgb(41, 41, 41)"
-PASS getComputedStyle(mediaControls.querySelector('.controls-bar > .background-tint')).display is "none"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<script src=""
-<body>
-<audio src="" style="width: 300px;" controls></audio>
-<script type="text/_javascript_">
-
-window.jsTestIsAsync = true;
-
-description("Testing that we show a gray background for macOS audio elements.");
-
-const mediaControls = window.internals.shadowRoot(document.querySelector('audio')).lastElementChild;
-
-shouldBecomeEqual("mediaControls.querySelector('.controls-bar') instanceof HTMLDivElement", "true", () => {
-    shouldBeEqualToString("getComputedStyle(mediaControls.querySelector('.controls-bar')).backgroundColor", "rgb(41, 41, 41)");
-    shouldBeEqualToString("getComputedStyle(mediaControls.querySelector('.controls-bar > .background-tint')).display", "none");
-    finishJSTest();
-});
-
-</script>
-<script src=""
-</body>

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,65 +0,0 @@
-Testing the MacOSInlineMediaControls computed styles.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-PlayPauseButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "12px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-SkipBackButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "10px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-MuteButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "10px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-AirplayButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "13px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-PiPButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "13px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-TracksButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "15px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-
-FullscreenButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "13px"
-PASS rgba(getComputedStyle(button.element).backgroundColor).r is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).g is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).b is 255
-PASS rgba(getComputedStyle(button.element).backgroundColor).a is within 0.001 of 0.45
-PASS getComputedStyle(button.element).height is "50px"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,43 +0,0 @@
-<script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<body>
-<script type="text/_javascript_">
-
-description("Testing the <code>MacOSInlineMediaControls</code> computed styles.");
-
-window.jsTestIsAsync = true;
-
-const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 300 });
-document.body.appendChild(mediaControls.element);
-
-const buttonPositions = [
-    [mediaControls.playPauseButton, 12],
-    [mediaControls.skipBackButton, 10],
-    [mediaControls.muteButton, 10],
-    [mediaControls.airplayButton, 13],
-    [mediaControls.pipButton, 13],
-    [mediaControls.tracksButton, 15],
-    [mediaControls.fullscreenButton, 13]
-];
-
-let button, y;
-(function testButton(index)
-{
-    [button, y] = buttonPositions[index];
-    debug("");
-    debug(button.constructor.name);
-    shouldBecomeEqualToString("getComputedStyle(button.element).webkitMaskPositionY", `${y}px`, () => {
-        shouldBeEqualToRGBAColor("getComputedStyle(button.element).backgroundColor", "rgba(255, 255, 255, 0.45)");
-        shouldBeEqualToString("getComputedStyle(button.element).height", "50px");
-        if (index === buttonPositions.length - 1) {
-            mediaControls.element.remove();
-            finishJSTest();
-        } else
-            testButton(index + 1);
-    });
-})(0);
-
-</script>
-<script src=""
-</body>

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,25 +0,0 @@
-Testing the MacOSInlineMediaControls computed styles in compact mode.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-PlayPauseButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "6px"
-PASS getComputedStyle(button.element).height is "25px"
-
-SkipBackButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "6px"
-PASS getComputedStyle(button.element).height is "25px"
-
-MuteButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "6px"
-PASS getComputedStyle(button.element).height is "25px"
-
-FullscreenButton
-PASS getComputedStyle(button.element).webkitMaskPositionY became "6.5px"
-PASS getComputedStyle(button.element).height is "25px"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,40 +0,0 @@
-<script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<body>
-<script type="text/_javascript_">
-
-description("Testing the <code>MacOSInlineMediaControls</code> computed styles in compact mode.");
-
-window.jsTestIsAsync = true;
-
-const mediaControls = new MacOSInlineMediaControls({ width: 240 });
-mediaControls.layoutTraits = LayoutTraits.macOS | LayoutTraits.Compact;
-document.body.appendChild(mediaControls.element);
-
-const buttonPositions = [
-    [mediaControls.playPauseButton, 6],
-    [mediaControls.skipBackButton, 6],
-    [mediaControls.muteButton, 6],
-    [mediaControls.fullscreenButton, 6.5]
-];
-
-let button, y;
-(function testButton(index)
-{
-    [button, y] = buttonPositions[index];
-    debug("");
-    debug(button.constructor.name);
-    shouldBecomeEqualToString("getComputedStyle(button.element).webkitMaskPositionY", `${y}px`, () => {
-        shouldBeEqualToString("getComputedStyle(button.element).height", "25px");
-        if (index === buttonPositions.length - 1) {
-            mediaControls.element.remove();
-            finishJSTest();
-        } else
-            testButton(index + 1);
-    });
-})(0);
-
-</script>
-<script src=""
-</body>

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,11 +0,0 @@
-Testing the MacOSInlineMediaControls computed styles in compact mode.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS mediaControls.controlsBar.element.getBoundingClientRect().height is 25
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,38 +0,0 @@
-<script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<body>
-<style type="text/css" media="screen">
-    
-.media-controls {
-    position: absolute;
-    top: 0;
-    left: 0;
-}
-    
-</style>
-<script type="text/_javascript_">
-
-description("Testing the <code>MacOSInlineMediaControls</code> computed styles in compact mode.");
-
-window.jsTestIsAsync = true;
-
-const mediaControls = new MacOSInlineMediaControls({ width: 240 });
-mediaControls.layoutTraits = LayoutTraits.macOS | LayoutTraits.Compact;
-
-let bounds;
-scheduler.frameDidFire = function()
-{
-    document.body.appendChild(mediaControls.element);
-
-    shouldBe("mediaControls.controlsBar.element.getBoundingClientRect().height", "25");
-
-    mediaControls.element.remove();
-
-    debug("");
-    finishMediaControlsTest();
-};
-
-</script>
-<script src=""
-</body>

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,17 +0,0 @@
-Testing MacOSInlineMediaControls in compact mode.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS mediaControls.element.classList.contains('compact') is true
-PASS mediaControls.leftContainer.leftMargin is 8
-PASS mediaControls.leftContainer.rightMargin is 12
-PASS mediaControls.leftContainer.buttonMargin is 12
-PASS mediaControls.rightContainer.leftMargin is 12
-PASS mediaControls.rightContainer.rightMargin is 8
-PASS mediaControls.rightContainer.buttonMargin is 12
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1,23 +0,0 @@
-<script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<body>
-<script type="text/_javascript_">
-
-description("Testing <code>MacOSInlineMediaControls</code> in compact mode.");
-
-const mediaControls = new MacOSInlineMediaControls({ width: 240 });
-mediaControls.layoutTraits = LayoutTraits.macOS | LayoutTraits.Compact;
-
-shouldBeTrue("mediaControls.element.classList.contains('compact')");
-shouldBe("mediaControls.leftContainer.leftMargin", "8");
-shouldBe("mediaControls.leftContainer.rightMargin", "12");
-shouldBe("mediaControls.leftContainer.buttonMargin", "12");
-shouldBe("mediaControls.rightContainer.leftMargin", "12");
-shouldBe("mediaControls.rightContainer.rightMargin", "8");
-shouldBe("mediaControls.rightContainer.buttonMargin", "12");
-debug("");
-
-</script>
-<script src=""
-</body>

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,14 +3,14 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS style.left is "0px"
-PASS style.bottom is "0px"
-PASS style.width is "680px"
-PASS style.height is "50px"
-PASS bounds.left is 0
-PASS bounds.top is 250
-PASS bounds.width is 680
-PASS bounds.height is 50
+PASS style.left is "6px"
+PASS style.bottom is "6px"
+PASS style.width is "668px"
+PASS style.height is "31px"
+PASS bounds.left is 6
+PASS bounds.top is 263
+PASS bounds.width is 668
+PASS bounds.height is 31
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -24,18 +24,18 @@
 {
     document.body.appendChild(mediaControls.element);
 
-    style = window.getComputedStyle(mediaControls.controlsBar.element);
-    bounds = mediaControls.controlsBar.element.getBoundingClientRect();
+    style = window.getComputedStyle(mediaControls.bottomControlsBar.element);
+    bounds = mediaControls.bottomControlsBar.element.getBoundingClientRect();
     
-    shouldBeEqualToString("style.left", "0px");
-    shouldBeEqualToString("style.bottom", "0px");
-    shouldBeEqualToString("style.width", "680px");
-    shouldBeEqualToString("style.height", "50px");
+    shouldBeEqualToString("style.left", "6px");
+    shouldBeEqualToString("style.bottom", "6px");
+    shouldBeEqualToString("style.width", "668px");
+    shouldBeEqualToString("style.height", "31px");
 
-    shouldBe("bounds.left", "0");
-    shouldBe("bounds.top", "250");
-    shouldBe("bounds.width", "680");
-    shouldBe("bounds.height", "50");
+    shouldBe("bounds.left", "6");
+    shouldBe("bounds.top", "263");
+    shouldBe("bounds.width", "668");
+    shouldBe("bounds.height", "31");
 
     mediaControls.element.remove();
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,15 +3,32 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS mediaControls.controlsBar.children[0] instanceof BackgroundTint is true
-PASS mediaControls.controlsBar.children[1] instanceof ButtonsContainer is true
-PASS mediaControls.controlsBar.children[2] instanceof TimeControl is true
-PASS mediaControls.controlsBar.children[3] instanceof ButtonsContainer is true
-PASS mediaControls.timeControl.x is 118
-PASS mediaControls.timeControl.width == expectedTimeControlWidth is true
-PASS mediaControls.controlsBar.children[1].children is [mediaControls.playPauseButton, mediaControls.skipBackButton]
-PASS mediaControls.controlsBar.children[3].children is [mediaControls.muteButton, mediaControls.airplayButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]
-PASS mediaControls.volumeSlider.parent.x == expectedVolumeSliderContainerX is true
+PASS mediaControls.children.length is 2
+PASS mediaControls.children[0] is mediaControls.topLeftControlsBar
+PASS mediaControls.children[1] is mediaControls.bottomControlsBar
+PASS mediaControls.topLeftControlsBar.children.length is 2
+PASS mediaControls.topLeftControlsBar.children[0] instanceof BackgroundTint is true
+PASS mediaControls.topLeftControlsBar.children[1] instanceof ButtonsContainer is true
+PASS mediaControls.topLeftControlsBar.children[1].children.length is 2
+PASS mediaControls.topLeftControlsBar.children[1].children[0] is mediaControls.pipButton
+PASS mediaControls.topLeftControlsBar.children[1].children[1] is mediaControls.fullscreenButton
+PASS mediaControls.bottomControlsBar.children.length is 4
+PASS mediaControls.bottomControlsBar.children[0] instanceof BackgroundTint is true
+PASS mediaControls.bottomControlsBar.children[1] is mediaControls.leftContainer
+PASS mediaControls.bottomControlsBar.children[2] is mediaControls.timeControl
+PASS mediaControls.bottomControlsBar.children[3] is mediaControls.rightContainer
+PASS mediaControls.leftContainer.children.length is 3
+PASS mediaControls.leftContainer.children[0] is mediaControls.skipBackButton
+PASS mediaControls.leftContainer.children[1] is mediaControls.playPauseButton
+PASS mediaControls.leftContainer.children[2] is mediaControls.skipForwardButton
+PASS mediaControls.timeControl.children.length is 3
+PASS mediaControls.timeControl.children[0] is mediaControls.timeControl.elapsedTimeLabel
+PASS mediaControls.timeControl.children[1] is mediaControls.timeControl.scrubber
+PASS mediaControls.timeControl.children[2] is mediaControls.timeControl.remainingTimeLabel
+PASS mediaControls.rightContainer.children.length is 3
+PASS mediaControls.rightContainer.children[0] is mediaControls.muteButton
+PASS mediaControls.rightContainer.children[1] is mediaControls.airplayButton
+PASS mediaControls.rightContainer.children[2] is mediaControls.tracksButton
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -8,7 +8,7 @@
 
 window.jsTestIsAsync = true;
 
-const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 50 });
+const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 400 });
 
 const iconButtons = [
     mediaControls.playPauseButton,
@@ -20,30 +20,43 @@
     mediaControls.fullscreenButton
 ];
 
-// There is a 4-pixel difference in metrics between 1x and 2x due to the volume button having a different width.
-const is1x = window.devicePixelRatio == 1;
-const expectedTimeControlWidth = is1x ? 286 : 290;
-const expectedVolumeSliderContainerX = is1x ? 428 : 432;
-
 scheduler.frameDidFire = function()
 {
     if (iconButtons.some(button => button.width == 0))
         return;
 
-    shouldBeTrue("mediaControls.controlsBar.children[0] instanceof BackgroundTint");
-    shouldBeTrue("mediaControls.controlsBar.children[1] instanceof ButtonsContainer");
-    shouldBeTrue("mediaControls.controlsBar.children[2] instanceof TimeControl");
-    shouldBeTrue("mediaControls.controlsBar.children[3] instanceof ButtonsContainer");
+    shouldBe("mediaControls.children.length", "2");
+    shouldBe("mediaControls.children[0]", "mediaControls.topLeftControlsBar");
+    shouldBe("mediaControls.children[1]", "mediaControls.bottomControlsBar");
 
-    shouldBe("mediaControls.timeControl.x", "118");
+    shouldBe("mediaControls.topLeftControlsBar.children.length", "2");
+    shouldBeTrue("mediaControls.topLeftControlsBar.children[0] instanceof BackgroundTint");
+    shouldBeTrue("mediaControls.topLeftControlsBar.children[1] instanceof ButtonsContainer");
+    shouldBe("mediaControls.topLeftControlsBar.children[1].children.length", "2");
+    shouldBe("mediaControls.topLeftControlsBar.children[1].children[0]", "mediaControls.pipButton");
+    shouldBe("mediaControls.topLeftControlsBar.children[1].children[1]", "mediaControls.fullscreenButton");
 
-    shouldBeTrue("mediaControls.timeControl.width == expectedTimeControlWidth");
+    shouldBe("mediaControls.bottomControlsBar.children.length", "4");
+    shouldBeTrue("mediaControls.bottomControlsBar.children[0] instanceof BackgroundTint");
+    shouldBe("mediaControls.bottomControlsBar.children[1]", "mediaControls.leftContainer");
+    shouldBe("mediaControls.bottomControlsBar.children[2]", "mediaControls.timeControl");
+    shouldBe("mediaControls.bottomControlsBar.children[3]", "mediaControls.rightContainer");
 
-    shouldBe("mediaControls.controlsBar.children[1].children", "[mediaControls.playPauseButton, mediaControls.skipBackButton]");
-    shouldBe("mediaControls.controlsBar.children[3].children", "[mediaControls.muteButton, mediaControls.airplayButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton]");
+    shouldBe("mediaControls.leftContainer.children.length", "3");
+    shouldBe("mediaControls.leftContainer.children[0]", "mediaControls.skipBackButton");
+    shouldBe("mediaControls.leftContainer.children[1]", "mediaControls.playPauseButton");
+    shouldBe("mediaControls.leftContainer.children[2]", "mediaControls.skipForwardButton");
 
-    shouldBeTrue("mediaControls.volumeSlider.parent.x == expectedVolumeSliderContainerX");
+    shouldBe("mediaControls.timeControl.children.length", "3");
+    shouldBe("mediaControls.timeControl.children[0]", "mediaControls.timeControl.elapsedTimeLabel");
+    shouldBe("mediaControls.timeControl.children[1]", "mediaControls.timeControl.scrubber");
+    shouldBe("mediaControls.timeControl.children[2]", "mediaControls.timeControl.remainingTimeLabel");
 
+    shouldBe("mediaControls.rightContainer.children.length", "3");
+    shouldBe("mediaControls.rightContainer.children[0]", "mediaControls.muteButton");
+    shouldBe("mediaControls.rightContainer.children[1]", "mediaControls.airplayButton");
+    shouldBe("mediaControls.rightContainer.children[2]", "mediaControls.tracksButton");
+
     finishMediaControlsTest();
 };
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -8,7 +8,7 @@
 Making the controls 100px wider
 
 Making the controls bar visible again.
-PASS rightContainer.x is expectedRightContainerX + 100
+PASS mediaControls.rightContainer.x is expectedRightContainerX + 100
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -8,11 +8,9 @@
 
 window.jsTestIsAsync = true;
 
-const mediaControls = new MacOSInlineMediaControls({ width: 600 });
+const mediaControls = new MacOSInlineMediaControls({ width: 600, height: 400 });
 
-const leftContainer = mediaControls.controlsBar.children[1];
-const rightContainer = mediaControls.controlsBar.children[2];
-const buttons = leftContainer.buttons.concat(rightContainer.buttons);
+const buttons = mediaControls.leftContainer.children.concat(mediaControls.rightContainer.children);
 
 let numberOfFrames = 0;
 let expectedRightContainerX = 0;
@@ -25,9 +23,9 @@
 
     switch (numberOfFrames) {
     case 1:
-        mediaControls.controlsBar.visible = false;
+        mediaControls.bottomControlsBar.visible = false;
         debug("Making the controls bar invisible.");
-        expectedRightContainerX = rightContainer.x;
+        expectedRightContainerX = mediaControls.rightContainer.x;
         break;
     case 2:
         debug("");
@@ -35,10 +33,10 @@
         mediaControls.width += 100;
         break;
     case 3:
-        mediaControls.controlsBar.visible = true;
+        mediaControls.bottomControlsBar.visible = true;
         debug("");
         debug("Making the controls bar visible again.");
-        shouldBe("rightContainer.x", "expectedRightContainerX + 100");
+        shouldBe("mediaControls.rightContainer.x", "expectedRightContainerX + 100");
 
         debug("");
         finishMediaControlsTest();

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS getComputedStyle(mediaControls.startButton.element.firstElementChild).webkitBackdropFilter is "saturate(1.8) blur(20px)"
+PASS getComputedStyle(mediaControls.playPauseButton.element.firstElementChild.firstElementChild).webkitBackdropFilter is "saturate(1.8) blur(17.5px)"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-start-button-style.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -15,10 +15,10 @@
 let style;
 scheduler.frameDidFire = function()
 {
-    if (mediaControls.startButton.element.getBoundingClientRect().width == 0)
+    if (mediaControls.playPauseButton.element.getBoundingClientRect().width == 0)
         return;
 
-    shouldBeEqualToString("getComputedStyle(mediaControls.startButton.element.firstElementChild).webkitBackdropFilter", "saturate(1.8) blur(20px)");
+    shouldBeEqualToString("getComputedStyle(mediaControls.playPauseButton.element.firstElementChild.firstElementChild).webkitBackdropFilter", "saturate(1.8) blur(17.5px)");
 
     mediaControls.element.remove();
     finishMediaControlsTest();

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -4,12 +4,14 @@
 
 
 Default state
-PASS mediaControls.controlsBar.children.includes(mediaControls.statusLabel) is false
-PASS mediaControls.controlsBar.children.includes(mediaControls.timeControl) is true
+PASS mediaControls.statusLabel.enabled is false
+PASS mediaControls.statusLabel.parent is null
+PASS mediaControls.timeControl.parent is mediaControls.bottomControlsBar
 
-After setting statusLabel.enabled = true
-PASS mediaControls.controlsBar.children.includes(mediaControls.statusLabel) is true
-PASS mediaControls.controlsBar.children.includes(mediaControls.timeControl) is false
+After setting statusLabel.text to a non-null string
+PASS mediaControls.statusLabel.enabled is true
+PASS mediaControls.statusLabel.parent is mediaControls.bottomControlsBar
+PASS mediaControls.timeControl.parent is null
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -8,7 +8,7 @@
 
 window.jsTestIsAsync = true;
 
-const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 50 });
+const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 400 });
 
 let numberOfFrames = 0;
 scheduler.frameDidFire = function()
@@ -18,14 +18,16 @@
 
     if (numberOfFrames == 1) {
         debug("Default state");
-        shouldBeFalse("mediaControls.controlsBar.children.includes(mediaControls.statusLabel)");
-        shouldBeTrue("mediaControls.controlsBar.children.includes(mediaControls.timeControl)");
-        mediaControls.statusLabel.enabled = true;
+        shouldBeFalse("mediaControls.statusLabel.enabled");
+        shouldBeNull("mediaControls.statusLabel.parent");
+        shouldBe("mediaControls.timeControl.parent", "mediaControls.bottomControlsBar");
+        mediaControls.statusLabel.text = "Loading…";
     } else if (numberOfFrames == 2) {
         debug("");
-        debug("After setting statusLabel.enabled = true");
-        shouldBeTrue("mediaControls.controlsBar.children.includes(mediaControls.statusLabel)");
-        shouldBeFalse("mediaControls.controlsBar.children.includes(mediaControls.timeControl)");
+        debug("After setting statusLabel.text to a non-null string");
+        shouldBeTrue("mediaControls.statusLabel.enabled");
+        shouldBe("mediaControls.statusLabel.parent", "mediaControls.bottomControlsBar");
+        shouldBeNull("mediaControls.timeControl.parent");
         debug("");
         finishMediaControlsTest();
     }

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,9 +3,9 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS window.getComputedStyle(mediaControls.timeControl.scrubber.element).top is "13px"
-PASS window.getComputedStyle(mediaControls.timeControl.elapsedTimeLabel.element).top is "14.5px"
-PASS window.getComputedStyle(mediaControls.timeControl.remainingTimeLabel.element).top is "14.5px"
+PASS window.getComputedStyle(mediaControls.timeControl.scrubber.element).top is "0px"
+PASS window.getComputedStyle(mediaControls.timeControl.elapsedTimeLabel.element).top is "8px"
+PASS window.getComputedStyle(mediaControls.timeControl.remainingTimeLabel.element).top is "8px"
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -14,9 +14,9 @@
 {
     document.body.appendChild(mediaControls.element);
 
-    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.scrubber.element).top", "13px");
-    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.elapsedTimeLabel.element).top", "14.5px");
-    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.remainingTimeLabel.element).top", "14.5px");
+    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.scrubber.element).top", "0px");
+    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.elapsedTimeLabel.element).top", "8px");
+    shouldBeEqualToString("window.getComputedStyle(mediaControls.timeControl.remainingTimeLabel.element).top", "8px");
     debug("");
 
     mediaControls.element.remove();

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -4,19 +4,19 @@
 
 
 Default state
-PASS volumeSliderContainer.visible is false
+PASS volumeSliderContainer.parent is null
 
 Mouse enters the mute button
-PASS volumeSliderContainer.visible is true
+PASS volumeSliderContainer.parent is mediaControls
 
 Mouse leaves the mute button
-PASS volumeSliderContainer.visible is false
+PASS volumeSliderContainer.parent is null
 
 Mouse enters the mute button, then leaves it but enters the volume slider container
-PASS volumeSliderContainer.visible is true
+PASS volumeSliderContainer.parent is mediaControls
 
 Mouse leaves the volume slider container
-PASS volumeSliderContainer.visible is false
+PASS volumeSliderContainer.parent is null
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -9,28 +9,28 @@
 const volumeSliderContainer = mediaControls.volumeSlider.parent;
 
 debug("Default state")
-shouldBeFalse("volumeSliderContainer.visible");
+shouldBeNull("volumeSliderContainer.parent");
 
 debug("");
 debug("Mouse enters the mute button");
 mediaControls.muteButton.element.dispatchEvent(new MouseEvent("mouseenter"));
-shouldBeTrue("volumeSliderContainer.visible");
+shouldBe("volumeSliderContainer.parent", "mediaControls");
 
 debug("");
 debug("Mouse leaves the mute button");
 mediaControls.muteButton.element.dispatchEvent(new MouseEvent("mouseleave"));
-shouldBeFalse("volumeSliderContainer.visible");
+shouldBeNull("volumeSliderContainer.parent");
 
 debug("");
 debug("Mouse enters the mute button, then leaves it but enters the volume slider container");
 mediaControls.muteButton.element.dispatchEvent(new MouseEvent("mouseenter"));
 mediaControls.muteButton.element.dispatchEvent(new MouseEvent("mouseleave", { relatedTarget: volumeSliderContainer.element }));
-shouldBeTrue("volumeSliderContainer.visible");
+shouldBe("volumeSliderContainer.parent", "mediaControls");
 
 debug("");
 debug("Mouse leaves the volume slider container");
 volumeSliderContainer.element.dispatchEvent(new MouseEvent("mouseleave"));
-shouldBeFalse("volumeSliderContainer.visible");
+shouldBeNull("volumeSliderContainer.parent");
 
 debug("");
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,13 +3,16 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS mediaControls.volumeSlider.parent.element.parentNode became mediaControls.element
 PASS volumeSliderContainerStyle.position is "absolute"
-PASS volumeSliderContainerStyle.bottom is "50px"
-PASS volumeSliderContainerStyle.width is "81px"
+PASS volumeSliderContainerStyle.left is "566px"
+PASS volumeSliderContainerStyle.top is "226px"
+PASS volumeSliderContainerStyle.width is "94px"
 PASS volumeSliderContainerStyle.height is "31px"
-PASS volumeSliderContainerStyle.transform is "matrix(0.00000000000000006123233995736766, -1, 1, 0.00000000000000006123233995736766, -25, -25)"
-PASS volumeSliderStyle.left is "11px"
-PASS volumeSliderStyle.top is "10px"
+PASS volumeSliderContainerStyle.transform is "matrix(0.00000000000000006123233995736766, -1, 1, 0.00000000000000006123233995736766, -30, -26.000000000000004)"
+PASS volumeSliderStyle.marginLeft is "6px"
+PASS volumeSliderStyle.width is "60px"
+PASS volumeSliderStyle.height is "16px"
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -9,30 +9,33 @@
 window.jsTestIsAsync = true;
 
 const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 300 });
-mediaControls.volumeSlider.parent.visible = true;
+document.body.appendChild(mediaControls.element);
 
 let volumeSliderContainerStyle, volumeSliderStyle;
-scheduler.frameDidFire = function()
-{
-    document.body.appendChild(mediaControls.element);
 
+shouldBecomeEqual("mediaControls.volumeSlider.parent.element.parentNode", "mediaControls.element", () => {
     volumeSliderContainerStyle = window.getComputedStyle(mediaControls.volumeSlider.parent.element);
     shouldBeEqualToString("volumeSliderContainerStyle.position", "absolute");
-    shouldBeEqualToString("volumeSliderContainerStyle.bottom", "50px");
-    shouldBeEqualToString("volumeSliderContainerStyle.width", "81px");
+    shouldBeEqualToString("volumeSliderContainerStyle.left", "566px");
+    shouldBeEqualToString("volumeSliderContainerStyle.top", "226px");
+    shouldBeEqualToString("volumeSliderContainerStyle.width", "94px");
     shouldBeEqualToString("volumeSliderContainerStyle.height", "31px");
-    shouldBeEqualToString("volumeSliderContainerStyle.transform", "matrix(0.00000000000000006123233995736766, -1, 1, 0.00000000000000006123233995736766, -25, -25)");
+    shouldBeEqualToString("volumeSliderContainerStyle.transform", "matrix(0.00000000000000006123233995736766, -1, 1, 0.00000000000000006123233995736766, -30, -26.000000000000004)");
 
     volumeSliderStyle = window.getComputedStyle(mediaControls.volumeSlider.element);
-    shouldBeEqualToString("volumeSliderStyle.left", "11px");
-    shouldBeEqualToString("volumeSliderStyle.top", "10px");
+    shouldBeEqualToString("volumeSliderStyle.marginLeft", "6px");
+    shouldBeEqualToString("volumeSliderStyle.width", "60px");
+    shouldBeEqualToString("volumeSliderStyle.height", "16px");
 
     mediaControls.element.remove();
 
     debug("");
     finishMediaControlsTest();
-};
+});
 
+// Simulate the mouse entering the volume button.
+window.requestAnimationFrame(() => mediaControls.muteButton.element.dispatchEvent(new MouseEvent("mouseenter")));
+
 </script>
 <script src=""
 </body>

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3,27 +3,16 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-TimeControl is visible
-TimeControl is not visible
+PASS ready() became true
 
-AirplayButton is visible
-AirplayButton is not visible
+SkipForwardButton was dropped at 488.
+SkipBackButton was dropped at 459.
+AirplayButton was dropped at 430.
+TracksButton was dropped at 398.
+PiPButton was dropped at 366.
+FullscreenButton was dropped at 331.
+MuteButton was dropped at 300.
 
-PiPButton is visible
-PiPButton is not visible
-
-TracksButton is visible
-TracksButton is not visible
-
-MuteButton is visible
-MuteButton is not visible
-
-SkipBackButton is visible
-SkipBackButton is not visible
-
-FullscreenButton is visible
-FullscreenButton is not visible
-
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html (227952 => 227953)


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html	2018-02-01 07:12:09 UTC (rev 227953)
@@ -8,58 +8,35 @@
 
 window.jsTestIsAsync = true;
 
-const mediaControls = new MacOSInlineMediaControls;
+const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 300 });
+mediaControls.shouldUseSingleBarLayout = true;
 
-// There is a 4-pixel difference in metrics between 1x and 2x due to the volume button having a different width.
-const is1x = window.devicePixelRatio == 1;
-const expectedWidthsForDrop = [
-    [mediaControls.timeControl, is1x ? 655 : 651],
-    [mediaControls.airplayButton, is1x ? 394 : 390],
-    [mediaControls.pipButton, is1x ? 345 : 341],
-    [mediaControls.tracksButton, is1x ? 294 : 290],
-    [mediaControls.muteButton, is1x ? 245 : 241],
-    [mediaControls.skipBackButton, 187],
-    [mediaControls.fullscreenButton, 139]
-];
-
-function dumpControlVisibility(control)
-{
-    let visibilityString = "visible";
-    if (!control.parent)
-        visibilityString = "not " + visibilityString;
-    debug(`${control.constructor.name} is ${visibilityString}`);
-}
-
-const iconButtons = [
-    mediaControls.playPauseButton,
+const droppableControls = [
+    mediaControls.skipForwardButton,
     mediaControls.skipBackButton,
     mediaControls.airplayButton,
+    mediaControls.tracksButton,
     mediaControls.pipButton,
-    mediaControls.tracksButton,
-    mediaControls.muteButton,
-    mediaControls.fullscreenButton
+    mediaControls.fullscreenButton,
+    mediaControls.muteButton
 ];
 
-scheduler.frameDidFire = function()
+function ready()
 {
-    if (iconButtons.some(button => button.width == 0))
-        return;
+    return droppableControls.concat(mediaControls.playPauseButton).every(button => button.width > 0);
+}
 
-    for (let [control, width] of expectedWidthsForDrop) {
-        mediaControls.width = width + 1;
-        mediaControls.layout();
-        dumpControlVisibility(control);
+shouldBecomeEqual("ready()", "true", () => {
+    debug("");
+    droppableControls.forEach(control => {
+        while (control.visible)
+            mediaControls.width--;
+        debug(`${control.constructor.name} was dropped at ${mediaControls.width + 1}.`);
+    });
+    debug("");
+    finishJSTest();
+});
 
-        mediaControls.width = width;
-        mediaControls.layout();
-        dumpControlVisibility(control);
-
-        debug("");
-    }
-
-    finishMediaControlsTest();
-};
-
 </script>
 <script src=""
 </body>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (227952 => 227953)


--- trunk/LayoutTests/platform/ios/TestExpectations	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2018-02-01 07:12:09 UTC (rev 227953)
@@ -3277,6 +3277,7 @@
 
 # These tests are designed to work only on macOS
 media/modern-media-controls/button/button-click-on-edges.html [ Skip ]
+media/modern-media-controls/macos-inline-media-controls [ Skip ]
 media/modern-media-controls/placard-support/placard-support-pip.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html [ Skip ]
 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html [ Skip ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (227952 => 227953)


--- trunk/LayoutTests/platform/mac/TestExpectations	2018-02-01 06:50:23 UTC (rev 227952)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2018-02-01 07:12:09 UTC (rev 227953)
@@ -1464,9 +1464,7 @@
 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/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html [ Pass ]
-media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html [ Pass ]
-media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html [ Pass ]
-media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html [ Pass ]
+media/modern-media-controls/macos-inline-media-controls [ Pass ]
 media/modern-media-controls/media-controller [ Pass ]
 media/modern-media-controls/media-controls/media-controls-display-above-captions.html [ Pass ]
 media/modern-media-controls/media-documents [ Pass ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to