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

Side by Side Diff: third_party/WebKit/LayoutTests/media/remove-from-document.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src=media-file.js></script> 4 <script src=media-file.js></script>
5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
6 (Please avoid writing new tests using video-test.js) -->
5 <script src=video-test.js></script> 7 <script src=video-test.js></script>
6 <script type="text/javascript" charset="utf-8"> 8 <script type="text/javascript" charset="utf-8">
7 function doSetup() 9 function doSetup()
8 { 10 {
9 video = document.getElementsByTagName('video')[0]; 11 video = document.getElementsByTagName('video')[0];
10 video.src = findMediaFile("video", "content/test"); 12 video.src = findMediaFile("video", "content/test");
11 } 13 }
12 14
13 function doTest () 15 function doTest ()
14 { 16 {
15 consoleWrite("EVENT(canplaythrough)"); 17 consoleWrite("EVENT(canplaythrough)");
16 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, " !="); 18 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, " !=");
17 testExpected("video.paused", false); 19 testExpected("video.paused", false);
18 20
19 run("document.body.removeChild(video)"); 21 run("document.body.removeChild(video)");
20 22
21 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, " !="); 23 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, " !=");
22 testExpected("video.paused", true); 24 testExpected("video.paused", true);
23 25
24 document.body.offsetTop; 26 document.body.offsetTop;
25 endTest(); 27 endTest();
26 } 28 }
27 29
28 window.addEventListener('load', doSetup, false); 30 window.addEventListener('load', doSetup, false);
29 </script> 31 </script>
30 </head> 32 </head>
31 <body> 33 <body>
32 <p>Test that removing a media element from the tree pauses playback but does not unload the media.</p> 34 <p>Test that removing a media element from the tree pauses playback but does not unload the media.</p>
33 <video controls autoplay oncanplaythrough="doTest()"></video> 35 <video controls autoplay oncanplaythrough="doTest()"></video>
34 </body> 36 </body>
35 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698