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

Side by Side Diff: third_party/WebKit/LayoutTests/media/avtrack/forget-on-load.html

Issue 2268373002: clean up media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 <title>AudioTrackList &amp; VideoTrackList after load()</title> 4 <title>AudioTrackList &amp; VideoTrackList after load()</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script> 7 <script src="../media-file.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <div id="log"></div>
11 <script> 10 <script>
12 async_test(function(t) 11 async_test(function(t)
13 { 12 {
14 var e = document.createElement("video"); 13 var video = document.createElement("video");
15 e.src = findMediaFile("video", "../content/test"); 14 video.src = findMediaFile("video", "../content/test");
16 15
17 e.addEventListener("loadedmetadata", t.step_func(function() 16 video.addEventListener("loadedmetadata", t.step_func_done(functi on()
18 { 17 {
19 18
20 assert_equals(e.audioTracks.length, 1, "audioTracks.length") ; 19 assert_equals(video.audioTracks.length, 1, "audioTracks.leng th");
21 assert_equals(e.videoTracks.length, 1, "videoTracks.length") ; 20 assert_equals(video.videoTracks.length, 1, "videoTracks.leng th");
22 assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.s electedIndex"); 21 assert_equals(video.videoTracks.selectedIndex, 0, "videoTrac ks.selectedIndex");
23 22
24 e.load(); 23 video.load();
25 24
26 assert_equals(e.audioTracks.length, 0, "audioTracks.length") ; 25 assert_equals(video.audioTracks.length, 0, "audioTracks.leng th");
27 assert_equals(e.videoTracks.length, 0, "videoTracks.length") ; 26 assert_equals(video.videoTracks.length, 0, "videoTracks.leng th");
28 assert_equals(e.videoTracks.selectedIndex, -1, "videoTracks. selectedIndex"); 27 assert_equals(video.videoTracks.selectedIndex, -1, "videoTra cks.selectedIndex");
29
30 t.done();
31 })); 28 }));
32 }); 29 });
33 </script> 30 </script>
34 </body> 31 </body>
35 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698