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

Side by Side Diff: LayoutTests/media/avtrack/video-track-selected.html

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>VideoTrack.selected change</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)
13 {
14 var e = document.createElement("video");
15 e.src = findMediaFile("video", "../content/test");
16
17 e.onloadedmetadata = t.step_func(function()
18 {
19 assert_equals(e.videoTracks.length, 1, "videoTracks.length") ;
20 assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.s electedIndex (initial)");
21 assert_true(e.videoTracks[0].selected, "videoTrack.selected (initial)");
22 e.videoTracks[0].selected = false;
23 assert_equals(e.videoTracks.selectedIndex, -1, "videoTracks. selectedIndex (first setter)");
24 assert_false(e.videoTracks[0].selected, "videoTrack.selected (first setter)");
25
26 e.videoTracks.onchange = t.unreached_func("setting selected to false fired change event");
27 setTimeout(t.step_func(function()
28 {
29 e.videoTracks[0].selected = true;
30 assert_equals(e.videoTracks.selectedIndex, 0, "videoTrac ks.selectedIndex (second setter)");
31 assert_true(e.videoTracks[0].selected, "videoTrack.selec ted (second setter)");
32
33 e.videoTracks.onchange = t.step_func(function()
34 {
35 assert_equals(e.videoTracks.selectedIndex, 0, "video Tracks.selectedIndex (change event)");
36 assert_true(e.videoTracks[0].selected, "videoTrack.s elected (change event)");
37 t.done();
38 });
39 }), 0);
40 });
41 }, "VideoTrackList track change");
42 </script>
43 </body>
44 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/avtrack/getTrackById.html ('k') | LayoutTests/webexposed/global-constructors-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698