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

Side by Side Diff: third_party/WebKit/LayoutTests/media/effective-media-volume.html

Issue 2268373002: clean up media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>effective media volume</title> 2 <title>effective media volume</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script> 5 <script>
7 [0, 0.5, 1].forEach(function(volume) 6 [0, 0.5, 1].forEach(function(volume)
8 { 7 {
9 [false, true].forEach(function(muted) 8 [false, true].forEach(function(muted)
10 { 9 {
11 test(function() 10 test(function()
12 { 11 {
13 var audio = new Audio(); 12 var audio = new Audio();
14 audio.volume = volume; 13 audio.volume = volume;
15 audio.muted = muted; 14 audio.muted = muted;
16 assert_equals(internals.effectiveMediaVolume(audio), 15 assert_equals(internals.effectiveMediaVolume(audio),
17 volume * (muted ? 0 : 1)); 16 volume * (muted ? 0 : 1));
18 }, "volume: " + volume + ", muted: " + muted); 17 }, "volume: " + volume + ", muted: " + muted);
19 }); 18 });
20 }); 19 });
21 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698