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

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

Issue 261783009: Use [TypeChecking=Unrestricted] for HTMLMediaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
1 <video controls></video> 1 <video controls></video>
2 <p>Test 'volume' attribute<p> 2 <p>Test 'volume' attribute<p>
3 <script src=media-file.js></script> 3 <script src=media-file.js></script>
4 <script src=video-test.js></script> 4 <script src=video-test.js></script>
5 <script> 5 <script>
6 testExpected("video.volume", 1.0); 6 testExpected("video.volume", 1.0);
7 run("video.volume = 0.5"); 7 run("video.volume = 0.5");
8 testExpected("video.volume", 0.5); 8 testExpected("video.volume", 0.5);
9 run("video.volume = Number.MIN_VALUE"); 9 run("video.volume = Number.MIN_VALUE");
10 testExpected("video.volume", Number.MIN_VALUE); 10 testExpected("video.volume", Number.MIN_VALUE);
11 run("video.volume = 0"); 11 run("video.volume = 0");
12 testExpected("video.volume", 0); 12 testExpected("video.volume", 0);
13 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 13 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
14 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR"); 14 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
15 testException("video.volume = -Infinity", '"TypeError: Failed to set the \'v olume\' property on \'HTMLMediaElement\': The value provided is infinite."'); 15 testException("video.volume = -Infinity", '"TypeError: Failed to set the \'v olume\' property on \'HTMLMediaElement\': The provided double value is non-finit e."');
16 testException("video.volume = Infinity", '"TypeError: Failed to set the \'vo lume\' property on \'HTMLMediaElement\': The value provided is infinite."'); 16 testException("video.volume = Infinity", '"TypeError: Failed to set the \'vo lume\' property on \'HTMLMediaElement\': The provided double value is non-finite ."');
17 testException("video.volume = NaN", '"TypeError: Failed to set the \'volume\ ' property on \'HTMLMediaElement\': The value provided is not a number."'); 17 testException("video.volume = NaN", '"TypeError: Failed to set the \'volume\ ' property on \'HTMLMediaElement\': The provided double value is non-finite."');
18 video.src = findMediaFile("video", "content/test"); 18 video.src = findMediaFile("video", "content/test");
19 run("video.load()"); 19 run("video.load()");
20 waitForEvent("canplaythrough", function () { 20 waitForEvent("canplaythrough", function () {
21 testExpected("video.volume", 0); 21 testExpected("video.volume", 0);
22 run("video.volume = 0.5"); 22 run("video.volume = 0.5");
23 testExpected("video.volume", 0.5); 23 testExpected("video.volume", 0.5);
24 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 24 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
25 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR"); 25 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
26 endTest(); 26 endTest();
27 }); 27 });
28 </script> 28 </script>
OLDNEW
« no previous file with comments | « LayoutTests/media/video-playbackrate-expected.txt ('k') | LayoutTests/media/video-volume-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698