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

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

Issue 1373423003: Remove MediaController (already diabled by REF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update web-platform-tests expectations Created 5 years, 1 month 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> 5 <div id="log"></div>
6 <script> 6 <script>
7 [0, 0.5, 1].forEach(function(volume) 7 [0, 0.5, 1].forEach(function(volume)
8 { 8 {
9 [false, true].forEach(function(muted) 9 [false, true].forEach(function(muted)
10 { 10 {
11 test(function() 11 test(function()
12 { 12 {
13 var audio = new Audio(); 13 var audio = new Audio();
14 audio.volume = volume; 14 audio.volume = volume;
15 audio.muted = muted; 15 audio.muted = muted;
16 assert_equals(internals.effectiveMediaVolume(audio), 16 assert_equals(internals.effectiveMediaVolume(audio),
17 volume * (muted ? 0 : 1)); 17 volume * (muted ? 0 : 1));
18 }, "volume: " + volume + ", muted: " + muted); 18 }, "volume: " + volume + ", muted: " + muted);
19
20 [0, 0.5, 1].forEach(function(controllerVolume)
21 {
22 [false, true].forEach(function(controllerMuted)
23 {
24 test(function()
25 {
26 var audio = new Audio();
27 audio.volume = volume;
28 audio.muted = muted;
29 var controller = new MediaController();
30 controller.volume = controllerVolume;
31 controller.muted = controllerMuted;
32 audio.controller = controller;
33 assert_equals(internals.effectiveMediaVolume(audio),
34 volume * (muted ? 0 : 1) * controllerVolume * (controllerMuted ? 0 : 1));
35 }, "volume: " + volume + ", muted: " + muted + ", controller vol ume: " + controllerVolume + ", controller muted: " + controllerMuted);
36 });
37 });
38 }); 19 });
39 }); 20 });
40 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698