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

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

Issue 444173002: Let the effective media volume be 0 if the media element is muted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 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 <title>effective media volume</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script>
7 [0, 0.5, 1].forEach(function(volume)
acolwell GONE FROM CHROMIUM 2014/08/07 15:52:58 ooo.. fancy. :)
8 {
9 [false, true].forEach(function(muted)
10 {
11 test(function()
12 {
13 var audio = new Audio();
14 audio.volume = volume;
15 audio.muted = muted;
16 assert_equals(internals.effectiveMediaVolume(audio),
17 volume * (muted ? 0 : 1));
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 });
39 });
40 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.h » ('j') | Source/web/WebMediaPlayerClientImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698