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

Unified Diff: third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html

Issue 1943823002: Deflake media/track/media-element-move-to-new-document-assert.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
Index: third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html
diff --git a/third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html b/third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html
index ccaa218c43255b7d966b5148228fdc497e6b1795..13c2f6e60a202a86c02fec588a6c5e1be7777b47 100644
--- a/third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html
+++ b/third_party/WebKit/LayoutTests/media/track/media-element-move-to-new-document-assert.html
@@ -4,19 +4,25 @@ video with text track between documents.</p>
<video></video>
<iframe></iframe>
<script>
-if (window.testRunner)
+if (window.testRunner) {
testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
-var video = document.querySelector("video");
-var track = document.createElement("track");
+window.onload = function () {
+ var video = document.querySelector("video");
+ var track = document.createElement("track");
-// Note: The order of setting the text track mode and appending the
-// track element is important, in terms of implementation and spec:
-// https://www.w3.org/Bugs/Public/show_bug.cgi?id=28973
-track.track.mode = "showing";
-video.appendChild(track);
+ // Note: The order of setting the text track mode and appending the
+ // track element is important, in terms of implementation and spec:
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28973
+ track.track.mode = "showing";
+ video.appendChild(track);
-// Move the video element to another document.
-var iframe = document.querySelector("iframe");
-iframe.contentDocument.body.appendChild(video);
+ // Move the video element to another document.
+ var iframe = document.querySelector("iframe");
+ iframe.contentDocument.body.appendChild(video);
+ if (window.testRunner)
+ testRunner.notifyDone();
+};
</script>

Powered by Google App Engine
This is Rietveld 408576698