Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html

Issue 2586223002: Unflake media/video-poster-after-loadedmetadata.html (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html
diff --git a/third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html b/third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html
index 21b88a417d70d3f540ffc9723072b22d51434fb8..36f2ff09f98d844aeb3ddab943a13eb700133d88 100644
--- a/third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html
+++ b/third_party/WebKit/LayoutTests/media/video-poster-after-loadedmetadata.html
@@ -1,20 +1,15 @@
<!DOCTYPE html>
<title>Tests setting the poster attribute after a video fires loadedmetadata.</title>
+<video></video>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
-function startTest() {
- var video = document.querySelector('video');
- video.addEventListener("loadedmetadata", function () {
- video.poster = "content/abe.png";
- if (window.testRunner)
- setTimeout(function() { testRunner.notifyDone(); }, 2000);
- });
-
- video.src = "resources/test-positive-start-time.webm";
-}
+var video = document.querySelector('video');
+video.addEventListener("loadedmetadata", _ => {
+ video.poster = "content/abe.png";
+ setTimeout(_ => requestAnimationFrame(_ => testRunner.notifyDone()));
+});
-window.addEventListener('load', startTest, false);
+video.src = "resources/test-positive-start-time.webm";
</script>
-<video></video>
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698