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

Unified Diff: LayoutTests/media/avtrack/audio-track-enabled.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/addtrack.html ('k') | LayoutTests/media/avtrack/forget-on-load.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/avtrack/audio-track-enabled.html
diff --git a/LayoutTests/media/avtrack/audio-track-enabled.html b/LayoutTests/media/avtrack/audio-track-enabled.html
new file mode 100644
index 0000000000000000000000000000000000000000..4932f5014adbfb0a9728bec1aa235e2910001145
--- /dev/null
+++ b/LayoutTests/media/avtrack/audio-track-enabled.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<html>
+ <head>
+ <title>AudioTrack.enabled change</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("audio");
+ e.src = findMediaFile("audio", "../content/test");
+
+ e.onloadedmetadata = t.step_func(function()
+ {
+ assert_equals(e.audioTracks.length, 1, "audioTracks.length");
+ assert_true(e.audioTracks[0].enabled, "audioTrack.enabled (initial)");
+ e.audioTracks[0].enabled = false;
+ assert_false(e.audioTracks[0].enabled, "audioTrack.enabled (first setter)");
+
+ e.audioTracks.onchange = t.step_func(function()
+ {
+ assert_false(e.audioTracks[0].enabled, "audioTrack.enabled (first change event)");
+ e.audioTracks[0].enabled = true;
+ assert_true(e.audioTracks[0].enabled, "audioTrack.enabled (second setter)");
+
+ e.audioTracks.onchange = t.step_func(function()
+ {
+ assert_true(e.audioTracks[0].enabled, "audioTrack.enabled (second change event)");
+ t.done();
+ });
+ });
+ });
+ }, "AudioTrack.enabled = false");
+ </script>
+ </body>
+</html>
« no previous file with comments | « LayoutTests/media/avtrack/addtrack.html ('k') | LayoutTests/media/avtrack/forget-on-load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698