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

Side by Side Diff: LayoutTests/media/avtrack/getTrackById.html

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: global-constructors-listing-expected 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>AudioTrackList &amp; VideoTrackList.getTrackById</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.addEventListener('loadedmetadata', t.step_func(function()
18 {
19 assert_equals(e.audioTracks.length, 1);
20 assert_equals(e.audioTracks.getTrackById(e.audioTracks[0].id ), e.audioTracks[0]);
21 assert_equals(e.audioTracks.getTrackById('fake-id'), null);
acolwell GONE FROM CHROMIUM 2014/06/13 17:43:57 nit: Test when lists are empty too?
philipj_slow 2014/06/14 13:51:03 Done.
22
23 assert_equals(e.videoTracks.length, 1);
24 assert_equals(e.videoTracks.getTrackById(e.videoTracks[0].id ), e.videoTracks[0]);
25 assert_equals(e.videoTracks.getTrackById('fake-id'), null);
26
27 t.done();
28 }));
29 });
30 </script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698