Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / avtrack / forget-on-load.html
blob52657d55368f55f5d796f38bffbbd3fd402dff0d
1 <!doctype html>
2 <html>
3 <head>
4 <title>AudioTrackList &amp; VideoTrackList after load()</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script>
8 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 async_test(function(t)
14 var e = document.createElement("video");
15 e.src = findMediaFile("video", "../content/test");
17 e.addEventListener("loadedmetadata", t.step_func(function()
20 assert_equals(e.audioTracks.length, 1, "audioTracks.length");
21 assert_equals(e.videoTracks.length, 1, "videoTracks.length");
22 assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex");
24 e.load();
26 assert_equals(e.audioTracks.length, 0, "audioTracks.length");
27 assert_equals(e.videoTracks.length, 0, "videoTracks.length");
28 assert_equals(e.videoTracks.selectedIndex, -1, "videoTracks.selectedIndex");
30 t.done();
31 }));
32 });
33 </script>
34 </body>
35 </html>