REGRESSION (r207299): media/modern-media-controls/pip-button/pip-button.html and...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2016 09:49:47 +0000 (09:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Oct 2016 09:49:47 +0000 (09:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163411

Patch by Antoine Quint <graouts@apple.com> on 2016-10-14
Reviewed by Antoine Quint.

Ensure all buttons have their required images loaded before we check on the mask-image set through CSS.

* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
* media/modern-media-controls/forward-button/forward-button.html:
* media/modern-media-controls/fullscreen-button/fullscreen-button.html:
* media/modern-media-controls/mute-button/mute-button.html:
* media/modern-media-controls/pip-button/pip-button.html:
* media/modern-media-controls/rewind-button/rewind-button.html:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* media/modern-media-controls/tracks-button/tracks-button.html:

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

LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html
LayoutTests/media/modern-media-controls/forward-button/forward-button.html
LayoutTests/media/modern-media-controls/fullscreen-button/fullscreen-button.html
LayoutTests/media/modern-media-controls/mute-button/mute-button.html
LayoutTests/media/modern-media-controls/pip-button/pip-button.html
LayoutTests/media/modern-media-controls/rewind-button/rewind-button.html
LayoutTests/media/modern-media-controls/skip-back-button/skip-back-button.html
LayoutTests/media/modern-media-controls/tracks-button/tracks-button.html

index 152c55b..d74408a 100644 (file)
@@ -1,3 +1,21 @@
+2016-10-14  Antoine Quint  <graouts@apple.com>
+
+        REGRESSION (r207299): media/modern-media-controls/pip-button/pip-button.html and media/modern-media-controls/skip-back-button/skip-back-button.html are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=163411
+
+        Reviewed by Antoine Quint.
+
+        Ensure all buttons have their required images loaded before we check on the mask-image set through CSS.
+
+        * media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
+        * media/modern-media-controls/forward-button/forward-button.html:
+        * media/modern-media-controls/fullscreen-button/fullscreen-button.html:
+        * media/modern-media-controls/mute-button/mute-button.html:
+        * media/modern-media-controls/pip-button/pip-button.html:
+        * media/modern-media-controls/rewind-button/rewind-button.html:
+        * media/modern-media-controls/skip-back-button/skip-back-button.html:
+        * media/modern-media-controls/tracks-button/tracks-button.html:
+
 2016-10-14  Youenn Fablet  <youenn@apple.com>
 
         Make NetworkCache aware of fetch cache mode
index 384b3b1..e87a239 100644 (file)
@@ -30,6 +30,9 @@ shouldBeEqualToString("scaleToFitButton.iconName", `${Icons.ScaleToFit}`);
 
 scheduler.frameDidFire = function()
 {
+    if ([scaleToFillButton, scaleToFitButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('scaleToFillButton.element.style.webkitMaskImage.includes("macOS/scale-to-fill@")');
     shouldBeTrue('scaleToFitButton.element.style.webkitMaskImage.includes("macOS/scale-to-fit@")');
 
index 53b0bbd..698c663 100644 (file)
@@ -26,6 +26,9 @@ shouldBeEqualToString("forwardButton.iconName", `${Icons.Forward}`);
 
 scheduler.frameDidFire = function()
 {
+    if (forwardButton.width == 0)
+        return;
+
     shouldBeTrue('forwardButton.element.style.webkitMaskImage.includes("macOS/forward@")');
     finishJSTest();
 };
index 501aade..9b46286 100644 (file)
@@ -31,6 +31,9 @@ shouldBeEqualToString("exitFullscreenButton.iconName", `${Icons.ExitFullscreen}`
 
 scheduler.frameDidFire = function()
 {
+    if ([enterFullscreenButton, iOSEnterFullscreenButton, exitFullscreenButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('enterFullscreenButton.element.style.webkitMaskImage.includes("macOS/enter-fullscreen@")');
     shouldBeTrue('iOSEnterFullscreenButton.element.style.webkitMaskImage.includes("iOS/enter-fullscreen@")');
     shouldBeTrue('exitFullscreenButton.element.style.webkitMaskImage.includes("macOS/exit-fullscreen@")');
index 9b9d20d..7396bbc 100644 (file)
@@ -32,6 +32,9 @@ shouldBeEqualToString("mutedButton.iconName", `${Icons.VolumeMuted}`);
 
 scheduler.frameDidFire = function()
 {
+    if ([muteButton, mutedButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('muteButton.element.style.webkitMaskImage.includes("macOS/volume@")');
     shouldBeTrue('mutedButton.element.style.webkitMaskImage.includes("macOS/volume-mute@")');
     finishJSTest();
index 0e3799c..eef93ca 100644 (file)
@@ -28,6 +28,9 @@ const iOSPiPButton = new PiPButton({ layoutTraits: LayoutTraits.iOS });
 
 scheduler.frameDidFire = function()
 {
+    if ([pipButton, iOSPiPButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('pipButton.element.style.webkitMaskImage.includes("macOS/pip-in@")');
     shouldBeTrue('iOSPiPButton.element.style.webkitMaskImage.includes("iOS/pip-in@")');
     finishJSTest();
index 07493cf..3f63cc3 100644 (file)
@@ -26,6 +26,9 @@ shouldBeEqualToString("rewindButton.iconName", `${Icons.Rewind}`);
 
 scheduler.frameDidFire = function()
 {
+    if (rewindButton.width == 0)
+        return;
+
     shouldBeTrue('rewindButton.element.style.webkitMaskImage.includes("macOS/rewind@")');
     finishJSTest();
 };
index c7e9f2c..f197b7f 100644 (file)
@@ -28,6 +28,9 @@ const iOSSkipBackButton = new SkipBackButton({ layoutTraits: LayoutTraits.iOS })
 
 scheduler.frameDidFire = function()
 {
+    if ([skipBackButton, iOSSkipBackButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('skipBackButton.element.style.webkitMaskImage.includes("macOS/interval-skip-back@")');
     shouldBeTrue('iOSSkipBackButton.element.style.webkitMaskImage.includes("iOS/interval-skip-back@")');
     finishJSTest();
index 47f1789..6ae08bb 100644 (file)
@@ -28,6 +28,9 @@ const fullscreenTracksButton = new TracksButton({ layoutTraits: LayoutTraits.mac
 
 scheduler.frameDidFire = function()
 {
+    if ([tracksButton, fullscreenTracksButton].some(button => button.width == 0))
+        return;
+
     shouldBeTrue('tracksButton.element.style.webkitMaskImage.includes("macOS/media-selection@")');
     shouldBeTrue('fullscreenTracksButton.element.style.webkitMaskImage.includes("macOS/media-selection-fullscreen@")');
     finishJSTest();