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

Side by Side 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, 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <p>Test for failing EventDispatchForbiddenScope assert when moving a 2 <p>Test for failing EventDispatchForbiddenScope assert when moving a
3 video with text track between documents.</p> 3 video with text track between documents.</p>
4 <video></video> 4 <video></video>
5 <iframe></iframe> 5 <iframe></iframe>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner) {
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
10 }
9 11
10 var video = document.querySelector("video"); 12 window.onload = function () {
11 var track = document.createElement("track"); 13 var video = document.querySelector("video");
14 var track = document.createElement("track");
12 15
13 // Note: The order of setting the text track mode and appending the 16 // Note: The order of setting the text track mode and appending the
14 // track element is important, in terms of implementation and spec: 17 // track element is important, in terms of implementation and spec:
15 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28973 18 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28973
16 track.track.mode = "showing"; 19 track.track.mode = "showing";
17 video.appendChild(track); 20 video.appendChild(track);
18 21
19 // Move the video element to another document. 22 // Move the video element to another document.
20 var iframe = document.querySelector("iframe"); 23 var iframe = document.querySelector("iframe");
21 iframe.contentDocument.body.appendChild(video); 24 iframe.contentDocument.body.appendChild(video);
25 if (window.testRunner)
26 testRunner.notifyDone();
27 };
22 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698