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

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

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) -->
4 <script src=video-test.js></script> 6 <script src=video-test.js></script>
5 <script> 7 <script>
6 testExpected("video.volume", 1.0); 8 testExpected("video.volume", 1.0);
7 run("video.volume = 0.5"); 9 run("video.volume = 0.5");
8 testExpected("video.volume", 0.5); 10 testExpected("video.volume", 0.5);
9 run("video.volume = Number.MIN_VALUE"); 11 run("video.volume = Number.MIN_VALUE");
10 testExpected("video.volume", Number.MIN_VALUE); 12 testExpected("video.volume", Number.MIN_VALUE);
11 run("video.volume = 0"); 13 run("video.volume = 0");
12 testExpected("video.volume", 0); 14 testExpected("video.volume", 0);
13 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 15 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
14 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR"); 16 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 provided double value is non-finit e."'); 17 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 provided double value is non-finite ."'); 18 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 provided double value is non-finite."'); 19 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"); 20 video.src = findMediaFile("video", "content/test");
19 run("video.load()"); 21 run("video.load()");
20 waitForEvent("canplaythrough", function () { 22 waitForEvent("canplaythrough", function () {
21 testExpected("video.volume", 0); 23 testExpected("video.volume", 0);
22 run("video.volume = 0.5"); 24 run("video.volume = 0.5");
23 testExpected("video.volume", 0.5); 25 testExpected("video.volume", 0.5);
24 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 26 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
25 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR"); 27 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
26 endTest(); 28 endTest();
27 }); 29 });
28 </script> 30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698