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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/avtrack/gc.html ('k') | LayoutTests/media/avtrack/video-track-selected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/avtrack/getTrackById.html
diff --git a/LayoutTests/media/avtrack/getTrackById.html b/LayoutTests/media/avtrack/getTrackById.html
new file mode 100644
index 0000000000000000000000000000000000000000..1f76930ac4c6b68624c9c5fd5038607b685f38ff
--- /dev/null
+++ b/LayoutTests/media/avtrack/getTrackById.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html>
+ <head>
+ <title>AudioTrackList &amp; VideoTrackList.getTrackById</title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <script src="../media-file.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ async_test(function(t)
+ {
+ var e = document.createElement('video');
+
+ assert_equals(e.audioTracks.length, 0);
+ assert_equals(e.audioTracks.getTrackById(''), null);
+
+ assert_equals(e.videoTracks.length, 0);
+ assert_equals(e.videoTracks.getTrackById(''), null);
+
+ e.src = findMediaFile('video', '../content/test');
+
+ e.addEventListener('loadedmetadata', t.step_func(function()
+ {
+ assert_equals(e.audioTracks.length, 1);
+ assert_equals(e.audioTracks.getTrackById(e.audioTracks[0].id), e.audioTracks[0]);
+ assert_equals(e.audioTracks.getTrackById('fake-id'), null);
+
+ assert_equals(e.videoTracks.length, 1);
+ assert_equals(e.videoTracks.getTrackById(e.videoTracks[0].id), e.videoTracks[0]);
+ assert_equals(e.videoTracks.getTrackById('fake-id'), null);
+
+ t.done();
+ }));
+ });
+ </script>
+ </body>
+</html>
« no previous file with comments | « LayoutTests/media/avtrack/gc.html ('k') | LayoutTests/media/avtrack/video-track-selected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698