Title: [275391] trunk/LayoutTests
Revision
275391
Author
[email protected]
Date
2021-04-01 15:50:07 -0700 (Thu, 01 Apr 2021)

Log Message

REGRESSION (r275358): [ macOS ] 2X media/modern-media-controls layout-tests are text failing
https://bugs.webkit.org/show_bug.cgi?id=224061
<rdar://problem/76115550>

Unreviewed test fix.


* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
Set a `maximumRightContainerButtonCountOverride` so that the collapsing behavior of the
overflow button doesn't affect the test (and force a layout to ensure it's picked up).

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (275390 => 275391)


--- trunk/LayoutTests/ChangeLog	2021-04-01 22:30:55 UTC (rev 275390)
+++ trunk/LayoutTests/ChangeLog	2021-04-01 22:50:07 UTC (rev 275391)
@@ -1,3 +1,18 @@
+2021-04-01  Devin Rousso  <[email protected]>
+
+        REGRESSION (r275358): [ macOS ] 2X media/modern-media-controls layout-tests are text failing
+        https://bugs.webkit.org/show_bug.cgi?id=224061
+        <rdar://problem/76115550>
+
+        Unreviewed test fix.
+
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
+        * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
+        * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
+        Set a `maximumRightContainerButtonCountOverride` so that the collapsing behavior of the
+        overflow button doesn't affect the test (and force a layout to ensure it's picked up).
+
 2021-04-01  Amir Mark Jr  <[email protected]>
 
         [BigSur Wk1 Release] webanimations/accelerated* tests are flaky image failing

Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt (275390 => 275391)


--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt	2021-04-01 22:30:55 UTC (rev 275390)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt	2021-04-01 22:50:07 UTC (rev 275391)
@@ -26,17 +26,17 @@
 
 PiPButton
 PASS getComputedStyle(button.element).top became "18px"
-PASS getComputedStyle(button.element).left is "36px"
+PASS getComputedStyle(button.element).left is "55px"
 PASS getComputedStyle(button.element).height is "16px"
 
 TracksButton
 PASS getComputedStyle(button.element).top became "18px"
-PASS getComputedStyle(button.element).left is "60px"
+PASS getComputedStyle(button.element).left is "98px"
 PASS getComputedStyle(button.element).height is "16px"
 
 FullscreenButton
 PASS getComputedStyle(button.element).top became "18px"
-PASS getComputedStyle(button.element).left is "55px"
+PASS getComputedStyle(button.element).left is "139px"
 PASS getComputedStyle(button.element).height is "16px"
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html (275390 => 275391)


--- trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html	2021-04-01 22:30:55 UTC (rev 275390)
+++ trunk/LayoutTests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html	2021-04-01 22:50:07 UTC (rev 275391)
@@ -8,27 +8,31 @@
 
 window.jsTestIsAsync = true;
 
-const mediaControls = new MacOSFullscreenMediaControls;
+const mediaControls = new MacOSFullscreenMediaControls({ width: 680, height: 300 });
+mediaControls.maximumRightContainerButtonCountOverride = 100; // A finite value larger than anything likely.
+
 document.body.appendChild(mediaControls.element);
 
 const buttonPositions = [
-    [mediaControls.rewindButton, 27, 14, 16],
-    [mediaControls.playPauseButton, 78, 9, 26],
-    [mediaControls.forwardButton, 127, 14, 16],
-    [mediaControls.airplayButton, 12, 18, 16],
-    [mediaControls.pipButton, 36, 18, 16],
-    [mediaControls.tracksButton, 60, 18, 16],
-    [mediaControls.fullscreenButton, 55, 18, 16],
+    //                              left top height
+    [mediaControls.rewindButton,      27, 14,   16],
+    [mediaControls.playPauseButton,   78,  9,   26],
+    [mediaControls.forwardButton,    127, 14,   16],
+    [mediaControls.airplayButton,     12, 18,   16],
+    [mediaControls.pipButton,         55, 18,   16],
+    [mediaControls.tracksButton,      98, 18,   16],
+    [mediaControls.fullscreenButton, 139, 18,   16],
 ];
 
-let button, x, y;
+let button;
 (function testButton(index)
 {
-    [button, x, y, height] = buttonPositions[index];
+    let left, top, height;
+    [button, left, top, height] = buttonPositions[index];
     debug("");
     debug(button.constructor.name);
-    shouldBecomeEqualToString("getComputedStyle(button.element).top", `${y}px`, () => {
-        shouldBeEqualToString("getComputedStyle(button.element).left", `${x}px`);
+    shouldBecomeEqualToString("getComputedStyle(button.element).top", `${top}px`, () => {
+        shouldBeEqualToString("getComputedStyle(button.element).left", `${left}px`);
         shouldBeEqualToString("getComputedStyle(button.element).height", `${height}px`);
         if (index === buttonPositions.length - 1) {
             mediaControls.element.remove();

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


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt	2021-04-01 22:30:55 UTC (rev 275390)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt	2021-04-01 22:50:07 UTC (rev 275391)
@@ -5,14 +5,13 @@
 
 PASS ready() became true
 
-TracksButton was dropped at 681.
-PiPButton was dropped at 681.
+TracksButton was dropped at 482.
+PiPButton was dropped at 482.
 SkipForwardButton was dropped at 447.
 SkipBackButton was dropped at 418.
 MuteButton was dropped at 389.
 AirplayButton was dropped at 351.
 FullscreenButton was dropped at 319.
-OverflowButton was dropped at 288.
 
 PASS successfullyParsed is true
 

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


--- trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html	2021-04-01 22:30:55 UTC (rev 275390)
+++ trunk/LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html	2021-04-01 22:50:07 UTC (rev 275391)
@@ -10,9 +10,13 @@
 
 const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 300 });
 mediaControls.shouldUseSingleBarLayout = true;
+mediaControls.maximumRightContainerButtonCountOverride = 100; // A finite value larger than anything likely.
 
+// Trigger a layout so that `maximumRightContainerButtonCountOverride` takes effect.
+mediaControls.needsLayout = true;
+scheduler.flushScheduledLayoutCallbacks();
+
 const droppableControls = [
-    mediaControls.overflowButton,
     mediaControls.fullscreenButton,
     mediaControls.airplayButton,
     mediaControls.muteButton,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to