- Revision
- 278678
- Author
- [email protected]
- Date
- 2021-06-09 15:42:51 -0700 (Wed, 09 Jun 2021)
Log Message
(r278618) media/modern-media-controls/overflow-support/chapters.html is timing out since introduction
https://bugs.webkit.org/show_bug.cgi?id=226828
<rdar://problem/79084756>
Unreviewed text fix.
* media/modern-media-controls/overflow-support/chapters.html:
* media/modern-media-controls/overflow-support/chapters-expected.txt:
Wait for the `<track kind="chapters">` to load before clicking on the overflow button as
otherwise there won't be any chapter cues to display in the contextmenu, meaning that the
contextmenu would be empty and therefore not be shown.
* http/tests/resources/js-test-pre.js:
(shouldBecomeEqual):
(shouldBecomeDifferent):
* resources/js-test-pre.js:
(shouldBecomeEqual):
(shouldBecomeDifferent):
* resources/js-test.js:
(shouldBecomeEqual):
(shouldBecomeDifferent):
Allow for `completionHandler` to not be provided, which will cause the function to return a `Promise`.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (278677 => 278678)
--- trunk/LayoutTests/ChangeLog 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/ChangeLog 2021-06-09 22:42:51 UTC (rev 278678)
@@ -1,3 +1,28 @@
+2021-06-09 Devin Rousso <[email protected]>
+
+ (r278618) media/modern-media-controls/overflow-support/chapters.html is timing out since introduction
+ https://bugs.webkit.org/show_bug.cgi?id=226828
+ <rdar://problem/79084756>
+
+ Unreviewed text fix.
+
+ * media/modern-media-controls/overflow-support/chapters.html:
+ * media/modern-media-controls/overflow-support/chapters-expected.txt:
+ Wait for the `<track kind="chapters">` to load before clicking on the overflow button as
+ otherwise there won't be any chapter cues to display in the contextmenu, meaning that the
+ contextmenu would be empty and therefore not be shown.
+
+ * http/tests/resources/js-test-pre.js:
+ (shouldBecomeEqual):
+ (shouldBecomeDifferent):
+ * resources/js-test-pre.js:
+ (shouldBecomeEqual):
+ (shouldBecomeDifferent):
+ * resources/js-test.js:
+ (shouldBecomeEqual):
+ (shouldBecomeDifferent):
+ Allow for `completionHandler` to not be provided, which will cause the function to return a `Promise`.
+
2021-06-09 Amir Mark Jr <[email protected]>
REGRESSION (r278630?): [iOS 14] http/tests/ssl/applepay/ApplePayButton.html is a constant failure
Modified: trunk/LayoutTests/http/tests/resources/js-test-pre.js (278677 => 278678)
--- trunk/LayoutTests/http/tests/resources/js-test-pre.js 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/http/tests/resources/js-test-pre.js 2021-06-09 22:42:51 UTC (rev 278678)
@@ -326,6 +326,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}
@@ -438,6 +442,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}
Modified: trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters-expected.txt (278677 => 278678)
--- trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters-expected.txt 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters-expected.txt 2021-06-09 22:42:51 UTC (rev 278678)
@@ -5,6 +5,7 @@
PASS shadowRoot.querySelector('button.overflow') became different from null
PASS shadowRoot.querySelector('button.overflow').getBoundingClientRect().width became different from 0
+PASS media.textTracks[0].mode became different from 'disabled'
Tapping overflow button...
Selecting first chapter cue...
PASS media.currentTime is >= 5
Modified: trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters.html (278677 => 278678)
--- trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters.html 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/media/modern-media-controls/overflow-support/chapters.html 2021-06-09 22:42:51 UTC (rev 278678)
@@ -20,25 +20,27 @@
let contextmenu = null;
-media.addEventListener("play", function() {
+media.addEventListener("play", async function() {
media.pause();
- shouldBecomeDifferent("shadowRoot.querySelector('button.overflow')", "null", () => {
- shouldBecomeDifferent("shadowRoot.querySelector('button.overflow').getBoundingClientRect().width", "0", async () => {
- debug("Tapping overflow button...");
- await pressOnElement(shadowRoot.querySelector("button.overflow"));
- contextmenu = await getTracksContextMenu();
+ await shouldBecomeDifferent("shadowRoot.querySelector('button.overflow')", "null");
- debug("Selecting first chapter cue...");
- await UIHelper.chooseMenuAction("ipsum");
- await UIHelper.waitForContextMenuToHide();
+ await shouldBecomeDifferent("shadowRoot.querySelector('button.overflow').getBoundingClientRect().width", "0");
- shouldBeGreaterThanOrEqual("media.currentTime", "5");
+ await shouldBecomeDifferent("media.textTracks[0].mode", "'disabled'");
- media.remove();
- finishJSTest();
- });
- });
+ debug("Tapping overflow button...");
+ await pressOnElement(shadowRoot.querySelector("button.overflow"));
+ contextmenu = await getTracksContextMenu();
+
+ debug("Selecting first chapter cue...");
+ await UIHelper.chooseMenuAction("ipsum");
+ await UIHelper.waitForContextMenuToHide();
+
+ shouldBeGreaterThanOrEqual("media.currentTime", "5");
+
+ media.remove();
+ finishJSTest();
});
</script>
Modified: trunk/LayoutTests/resources/js-test-pre.js (278677 => 278678)
--- trunk/LayoutTests/resources/js-test-pre.js 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/resources/js-test-pre.js 2021-06-09 22:42:51 UTC (rev 278678)
@@ -326,6 +326,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}
@@ -438,6 +442,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}
Modified: trunk/LayoutTests/resources/js-test.js (278677 => 278678)
--- trunk/LayoutTests/resources/js-test.js 2021-06-09 22:41:48 UTC (rev 278677)
+++ trunk/LayoutTests/resources/js-test.js 2021-06-09 22:42:51 UTC (rev 278678)
@@ -350,6 +350,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}
@@ -462,6 +466,10 @@
}
return false;
}
+
+ if (!completionHandler)
+ return new Promise(resolve => setTimeout(_waitForCondition, 0, condition, resolve));
+
setTimeout(_waitForCondition, 0, condition, completionHandler);
}