Rebaseline and enable media/modern-media-controls/button
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:36:51 +0000 (17:36 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jun 2017 17:36:51 +0000 (17:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173058
<rdar://problem/32615846>

Reviewed by Eric Carlson.

The IconButton class was removed and merged into its superclass Button, so we merge those tests
in a single directory. A couple tests no longer applied as we do not have a focused state for
buttons anymore, nor do we deal with changes in layout traits since there is no such thing as
a compact mode anymore.

* media/modern-media-controls/button/button-active-state-expected.txt: Added.
* media/modern-media-controls/button/button-active-state.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html.
* media/modern-media-controls/button/button-icon-name-expected.txt: Added.
* media/modern-media-controls/button/button-icon-name.html: Added.
* media/modern-media-controls/button/button-on-expected.txt: Added.
* media/modern-media-controls/button/button-on.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-on.html.
* media/modern-media-controls/button/button.html:
* media/modern-media-controls/icon-button/icon-button-active-state-expected.txt: Removed.
* media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt: Removed.
* media/modern-media-controls/icon-button/icon-button-change-layout-traits.html: Removed.
* media/modern-media-controls/icon-button/icon-button-expected.txt: Removed.
* media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt: Removed.
* media/modern-media-controls/icon-button/icon-button-focus-state.html: Removed.
* media/modern-media-controls/icon-button/icon-button-on-expected.txt: Removed.
* media/modern-media-controls/icon-button/icon-button.html: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

18 files changed:
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/button/button-active-state-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/button/button-active-state.html [moved from LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html with 68% similarity]
LayoutTests/media/modern-media-controls/button/button-icon-name-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/button/button-icon-name.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/button/button-on-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/button/button-on.html [moved from LayoutTests/media/modern-media-controls/icon-button/icon-button-on.html with 51% similarity]
LayoutTests/media/modern-media-controls/button/button.html
LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state-expected.txt [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits.html [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-expected.txt [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state.html [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button-on-expected.txt [deleted file]
LayoutTests/media/modern-media-controls/icon-button/icon-button.html [deleted file]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac/TestExpectations

index 1b09a4f..2143b29 100644 (file)
@@ -1,3 +1,34 @@
+2017-06-07  Antoine Quint  <graouts@apple.com>
+
+        Rebaseline and enable media/modern-media-controls/button
+        https://bugs.webkit.org/show_bug.cgi?id=173058
+        <rdar://problem/32615846>
+
+        Reviewed by Eric Carlson.
+
+        The IconButton class was removed and merged into its superclass Button, so we merge those tests
+        in a single directory. A couple tests no longer applied as we do not have a focused state for
+        buttons anymore, nor do we deal with changes in layout traits since there is no such thing as
+        a compact mode anymore.
+
+        * media/modern-media-controls/button/button-active-state-expected.txt: Added.
+        * media/modern-media-controls/button/button-active-state.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html.
+        * media/modern-media-controls/button/button-icon-name-expected.txt: Added.
+        * media/modern-media-controls/button/button-icon-name.html: Added.
+        * media/modern-media-controls/button/button-on-expected.txt: Added.
+        * media/modern-media-controls/button/button-on.html: Renamed from LayoutTests/media/modern-media-controls/icon-button/icon-button-on.html.
+        * media/modern-media-controls/button/button.html:
+        * media/modern-media-controls/icon-button/icon-button-active-state-expected.txt: Removed.
+        * media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt: Removed.
+        * media/modern-media-controls/icon-button/icon-button-change-layout-traits.html: Removed.
+        * media/modern-media-controls/icon-button/icon-button-expected.txt: Removed.
+        * media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt: Removed.
+        * media/modern-media-controls/icon-button/icon-button-focus-state.html: Removed.
+        * media/modern-media-controls/icon-button/icon-button-on-expected.txt: Removed.
+        * media/modern-media-controls/icon-button/icon-button.html: Removed.
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2017-06-07  Ryan Haddad  <ryanhaddad@apple.com>
 
         Remove TestExpectation for fast/backgrounds/background-repeat-x-y-parse.html.
diff --git a/LayoutTests/media/modern-media-controls/button/button-active-state-expected.txt b/LayoutTests/media/modern-media-controls/button/button-active-state-expected.txt
new file mode 100644 (file)
index 0000000..38004bd
--- /dev/null
@@ -0,0 +1,11 @@
+Testing an Button has a scale transform when pressed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle(button.image.element).transform is "matrix(0.89, 0, 0, 0.89, 0, 0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
@@ -3,19 +3,18 @@
 <body>
 <script type="text/javascript">
 
-description("Testing an <code>IconButton</code> has a white background-color when pressed.");
+description("Testing an <code>Button</code> has a scale transform when pressed.");
 
 window.jsTestIsAsync = true;
 
-const iconButton = new IconButton({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
-iconButton.iconName = Icons.Pause;
-document.body.appendChild(iconButton.element);
+const button = new Button({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
+button.iconName = Icons.Pause;
+document.body.appendChild(button.element);
 
 let x, y;
 
-function checkBackgroundColor()
-{
-    shouldBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(255, 255, 255)")
+button.image.element.addEventListener("transitionend", event => {
+    shouldBeEqualToString("window.getComputedStyle(button.image.element).transform", "matrix(0.89, 0, 0, 0.89, 0, 0)");
     if ("createTouch" in document) {
         testRunner.runUIScript(`
             uiController.liftUpAtPoint(${x}, ${y}, 1, function() {
@@ -25,11 +24,11 @@ function checkBackgroundColor()
         eventSender.mouseUp();
         finishJSTest();
     }
-}
+});
 
 scheduler.frameDidFire = function()
 {
-    const bounds = iconButton.element.getBoundingClientRect();
+    const bounds = button.element.getBoundingClientRect();
     if (bounds.height === 0)
         return;
 
@@ -42,11 +41,10 @@ scheduler.frameDidFire = function()
             testRunner.runUIScript(`
                 uiController.touchDownAtPoint(${x}, ${y}, 1, function() {
                     uiController.uiScriptComplete("Done");
-                })`, checkBackgroundColor);
+                })`);
         } else {
             eventSender.mouseMoveTo(x, y);
             eventSender.mouseDown();
-            checkBackgroundColor();
         }
     } else
         debug("This test is designed to run in DRT.");
diff --git a/LayoutTests/media/modern-media-controls/button/button-icon-name-expected.txt b/LayoutTests/media/modern-media-controls/button/button-icon-name-expected.txt
new file mode 100644 (file)
index 0000000..67031af
--- /dev/null
@@ -0,0 +1,32 @@
+Testing the Button class iconName property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+There should be no iconName by default
+PASS button.iconName is ""
+
+Setting an iconName with invalid layout traits should throw
+PASS function () { button.iconName = Icons.Pause } threw exception Could not identify icon's platform from layout traits..
+PASS button.iconName is ""
+
+Setting macOS inline layout traits and setting play icon
+PASS button.image.element.style.webkitMaskImage.includes("macOS/Pause.svg") is true
+PASS button.element.style.width is "11px"
+PASS button.element.style.height is "13px"
+PASS button.image.element.style.width is "11px"
+PASS button.image.element.style.height is "13px"
+PASS button.element.getAttribute('aria-label') is "Pause"
+
+Setting start icon
+PASS button.image.element.style.webkitMaskImage.includes("macOS/Rewind.svg") is true
+PASS button.element.style.width is "24px"
+PASS button.element.style.height is "16px"
+PASS button.image.element.style.width is "24px"
+PASS button.image.element.style.height is "16px"
+PASS button.element.getAttribute('aria-label') is "Rewind"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/media/modern-media-controls/button/button-icon-name.html b/LayoutTests/media/modern-media-controls/button/button-icon-name.html
new file mode 100644 (file)
index 0000000..c38f08b
--- /dev/null
@@ -0,0 +1,59 @@
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
+<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
+<body>
+<script type="text/javascript">
+
+window.jsTestIsAsync = true;
+
+description("Testing the <code>Button</code> class <code>iconName</code> property.");
+
+const layoutDelegate = {};
+
+const button = new Button({ layoutDelegate });
+
+debug("");
+debug("There should be no iconName by default");
+shouldBeEqualToString("button.iconName", "");
+
+debug("");
+debug("Setting an iconName with invalid layout traits should throw");
+shouldThrow(function() { button.iconName = Icons.Pause });
+shouldBeEqualToString("button.iconName", "");
+
+debug("");
+debug("Setting macOS inline layout traits and setting play icon");
+layoutDelegate.layoutTraits = LayoutTraits.macOS;
+button.iconName = Icons.Pause;
+
+let numberOfFrames = 0;
+
+scheduler.frameDidFire = function()
+{
+    numberOfFrames++;
+
+    if (numberOfFrames === 1) {
+        shouldBeTrue('button.image.element.style.webkitMaskImage.includes("macOS/Pause.svg")');
+        shouldBeEqualToString("button.element.style.width", "11px");
+        shouldBeEqualToString("button.element.style.height", "13px");
+        shouldBeEqualToString("button.image.element.style.width", "11px");
+        shouldBeEqualToString("button.image.element.style.height", "13px");
+        shouldBeEqualToString("button.element.getAttribute('aria-label')", `${Icons.Pause.label}`);
+        debug("");
+        debug("Setting start icon");
+        button.iconName = Icons.Rewind;
+    } else if (numberOfFrames === 2) {
+        shouldBeTrue('button.image.element.style.webkitMaskImage.includes("macOS/Rewind.svg")');
+        shouldBeEqualToString("button.element.style.width", "24px");
+        shouldBeEqualToString("button.element.style.height", "16px");
+        shouldBeEqualToString("button.image.element.style.width", "24px");
+        shouldBeEqualToString("button.image.element.style.height", "16px");
+        shouldBeEqualToString("button.element.getAttribute('aria-label')", `${Icons.Rewind.label}`);
+
+        finishMediaControlsTest();
+    } 
+};
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
diff --git a/LayoutTests/media/modern-media-controls/button/button-on-expected.txt b/LayoutTests/media/modern-media-controls/button/button-on-expected.txt
new file mode 100644 (file)
index 0000000..fdd7b20
--- /dev/null
@@ -0,0 +1,11 @@
+Testing an Button has a white background-color when set to `on`.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle(button.image.element).backgroundColor is "rgb(255, 255, 255)"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
@@ -4,20 +4,20 @@
 <body>
 <script type="text/javascript">
 
-description("Testing an <code>IconButton</code> has a white background-color when set to `on`.");
+description("Testing an <code>Button</code> has a white background-color when set to `on`.");
 
 window.jsTestIsAsync = true;
 
-const iconButton = new IconButton({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
-iconButton.iconName = Icons.Pause;
-iconButton.on = true;
-document.body.appendChild(iconButton.element);
+const button = new Button({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
+button.iconName = Icons.Pause;
+button.on = true;
+document.body.appendChild(button.element);
 
 scheduler.frameDidFire = function()
 {
-    shouldBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(255, 255, 255)");
+    shouldBeEqualToString("window.getComputedStyle(button.image.element).backgroundColor", "rgb(255, 255, 255)");
 
-    iconButton.element.remove();
+    button.element.remove();
     debug("");
     finishMediaControlsTest();
 }
index cf3e49d..efd77f9 100644 (file)
@@ -51,6 +51,7 @@ pressOnElement(button.element, () => {
         shouldBeEqualToString("style.borderWidth", "0px");
         shouldBeEqualToString("style.webkitAppearance", "none");
 
+        button.element.remove();
         finishJSTest();
     });
 });
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state-expected.txt b/LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state-expected.txt
deleted file mode 100644 (file)
index 781f480..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Testing an IconButton has a white background-color when pressed.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.getComputedStyle(iconButton.element).backgroundColor is "rgb(255, 255, 255)"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt b/LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt
deleted file mode 100644 (file)
index 35d7b95..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Testing IconButton while changing layout traits.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-Setting macOS inline layout traits and setting play icon
-PASS iconButton.element.style.webkitMaskImage.includes("macOS/pause") is true
-PASS iconButton.element.style.width is "22px"
-PASS iconButton.element.style.height is "24px"
-PASS iconButton.element.style.webkitMaskSize is "22px 24px"
-
-Setting macOS inline and compact layout traits and notifying of a layout traits change
-PASS iconButton.element.style.webkitMaskImage.includes("macOS/pause-compact") is true
-PASS iconButton.element.style.width is "11px"
-PASS iconButton.element.style.height is "13px"
-PASS iconButton.element.style.webkitMaskSize is "11px 13px"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits.html b/LayoutTests/media/modern-media-controls/icon-button/icon-button-change-layout-traits.html
deleted file mode 100644 (file)
index 00f2f70..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<script src="../../../resources/js-test-pre.js"></script>
-<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
-<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
-<body>
-<script type="text/javascript">
-
-window.jsTestIsAsync = true;
-
-description("Testing <code>IconButton</code> while changing layout traits.");
-
-const layoutDelegate = {};
-
-const iconButton = new IconButton({ layoutDelegate });
-
-debug("");
-debug("Setting macOS inline layout traits and setting play icon");
-layoutDelegate.layoutTraits = LayoutTraits.macOS;
-iconButton.iconName = Icons.Pause;
-
-let numberOfFrames = 0;
-
-scheduler.frameDidFire = function()
-{
-    numberOfFrames++;
-
-    if (numberOfFrames === 1) {
-        shouldBeTrue('iconButton.element.style.webkitMaskImage.includes("macOS/pause")');
-        shouldBeEqualToString("iconButton.element.style.width", "22px");
-        shouldBeEqualToString("iconButton.element.style.height", "24px");
-        shouldBeEqualToString("iconButton.element.style.webkitMaskSize", "22px 24px");
-
-        debug("");
-        debug("Setting macOS inline and compact layout traits and notifying of a layout traits change");
-        layoutDelegate.layoutTraits = LayoutTraits.macOS | LayoutTraits.Compact;
-        iconButton.layoutTraitsDidChange();
-    } else if (numberOfFrames === 2) {
-        shouldBeTrue('iconButton.element.style.webkitMaskImage.includes("macOS/pause-compact")');
-        shouldBeEqualToString("iconButton.element.style.width", "11px");
-        shouldBeEqualToString("iconButton.element.style.height", "13px");
-        shouldBeEqualToString("iconButton.element.style.webkitMaskSize", "11px 13px");
-
-        finishMediaControlsTest();
-    } 
-};
-
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-expected.txt b/LayoutTests/media/modern-media-controls/icon-button/icon-button-expected.txt
deleted file mode 100644 (file)
index f2a2a97..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Testing the IconButton class.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS iconButton.element.localName is "button"
-PASS iconButton.element.className is "icon"
-
-There should be no iconName by default
-PASS iconButton.iconName is ""
-
-Setting an iconName with invalid layout traits should throw
-PASS function () { iconButton.iconName = Icons.Pause } threw exception Could not identify icon's platform from layout traits..
-PASS iconButton.iconName is ""
-
-Setting macOS inline layout traits and setting play icon
-PASS iconButton.element.style.webkitMaskImage.includes("macOS/pause") is true
-PASS iconButton.element.style.width is "22px"
-PASS iconButton.element.style.height is "24px"
-PASS iconButton.element.style.webkitMaskSize is "22px 24px"
-PASS iconButton.element.getAttribute('aria-label') is "Pause"
-
-Setting start icon
-PASS iconButton.element.style.webkitMaskImage.includes("macOS/start") is true
-PASS iconButton.element.style.width is "70px"
-PASS iconButton.element.style.height is "70px"
-PASS iconButton.element.style.webkitMaskSize is "70px 70px"
-PASS iconButton.element.getAttribute('aria-label') is "Start"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt b/LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt
deleted file mode 100644 (file)
index 8f898bb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Testing an IconButton has a blue background-color when focused.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Confirm inital icon button color.
-PASS window.getComputedStyle(iconButton.element).backgroundColor is "rgb(192, 192, 192)"
-Confirm icon button color changed after focus.
-PASS window.getComputedStyle(iconButton.element).backgroundColor is not "rgb(192, 192, 192)"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state.html b/LayoutTests/media/modern-media-controls/icon-button/icon-button-focus-state.html
deleted file mode 100644 (file)
index 38c0ad7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<script src="../../../resources/js-test-pre.js"></script>
-<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
-<body>
-<script type="text/javascript">
-
-description("Testing an <code>IconButton</code> has a blue background-color when focused.");
-
-window.jsTestIsAsync = true;
-
-const iconButton = new IconButton({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
-iconButton.iconName = Icons.Pause;
-document.body.appendChild(iconButton.element);
-
-debug("Confirm inital icon button color.");
-shouldBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(192, 192, 192)");
-
-iconButton.element.focus();
-
-debug("Confirm icon button color changed after focus.");
-shouldNotBeEqualToString("window.getComputedStyle(iconButton.element).backgroundColor", "rgb(192, 192, 192)");
-
-finishJSTest();
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button-on-expected.txt b/LayoutTests/media/modern-media-controls/icon-button/icon-button-on-expected.txt
deleted file mode 100644 (file)
index 8f68dda..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Testing an IconButton has a white background-color when set to `on`.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.getComputedStyle(iconButton.element).backgroundColor is "rgb(255, 255, 255)"
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/media/modern-media-controls/icon-button/icon-button.html b/LayoutTests/media/modern-media-controls/icon-button/icon-button.html
deleted file mode 100644 (file)
index 5565014..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<script src="../../../resources/js-test-pre.js"></script>
-<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
-<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
-<body>
-<script type="text/javascript">
-
-window.jsTestIsAsync = true;
-
-description("Testing the <code>IconButton</code> class.");
-
-const layoutDelegate = {};
-
-const iconButton = new IconButton({ layoutDelegate });
-
-shouldBeEqualToString("iconButton.element.localName", "button");
-shouldBeEqualToString("iconButton.element.className", "icon");
-
-debug("");
-debug("There should be no iconName by default");
-shouldBeEqualToString("iconButton.iconName", "");
-
-debug("");
-debug("Setting an iconName with invalid layout traits should throw");
-shouldThrow(function() { iconButton.iconName = Icons.Pause });
-shouldBeEqualToString("iconButton.iconName", "");
-
-debug("");
-debug("Setting macOS inline layout traits and setting play icon");
-layoutDelegate.layoutTraits = LayoutTraits.macOS;
-iconButton.iconName = Icons.Pause;
-
-let numberOfFrames = 0;
-
-scheduler.frameDidFire = function()
-{
-    numberOfFrames++;
-
-    if (numberOfFrames === 1) {
-        shouldBeTrue('iconButton.element.style.webkitMaskImage.includes("macOS/pause")');
-        shouldBeEqualToString("iconButton.element.style.width", "22px");
-        shouldBeEqualToString("iconButton.element.style.height", "24px");
-        shouldBeEqualToString("iconButton.element.style.webkitMaskSize", "22px 24px");
-
-        shouldBeEqualToString("iconButton.element.getAttribute('aria-label')", `${Icons.Pause.label}`);
-        debug("");
-        debug("Setting start icon");
-        iconButton.iconName = Icons.Start;
-    } else if (numberOfFrames === 2) {
-        shouldBeTrue('iconButton.element.style.webkitMaskImage.includes("macOS/start")');
-        shouldBeEqualToString("iconButton.element.style.width", "70px");
-        shouldBeEqualToString("iconButton.element.style.height", "70px");
-        shouldBeEqualToString("iconButton.element.style.webkitMaskSize", "70px 70px");
-        shouldBeEqualToString("iconButton.element.getAttribute('aria-label')", `${Icons.Start.label}`);
-
-        finishMediaControlsTest();
-    } 
-};
-
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
index 4403fe4..35f602b 100644 (file)
@@ -59,11 +59,16 @@ media/modern-media-controls/airplay-button [ Pass ]
 media/modern-media-controls/airplay-placard [ Pass ]
 media/modern-media-controls/audio [ Pass ]
 media/modern-media-controls/background-tint [ Pass ]
+media/modern-media-controls/button [ Pass ]
 
 # AirPlay cannot be tested on iOS
 webkit.org/b/166062 media/modern-media-controls/airplay-support [ Skip ]
 webkit.org/b/166062 media/modern-media-controls/audio/audio-controls-buttons.html [ Skip ]
 
+# These tests use touch events and don't work in OpenSource
+media/modern-media-controls/button/button.html [ Skip ]
+media/modern-media-controls/button/button-active-state.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 ddcbacb..4cba433 100644 (file)
@@ -1554,6 +1554,7 @@ media/modern-media-controls/airplay-placard [ Pass ]
 media/modern-media-controls/airplay-support [ Pass ]
 media/modern-media-controls/audio [ Pass ]
 media/modern-media-controls/background-tint [ Pass ]
+media/modern-media-controls/button [ 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 ]