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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls-volume-slider.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 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>media controls volume slider</title> 4 <title>media controls volume slider</title>
5 <script src="media-file.js"></script> 5 <script src="media-file.js"></script>
6 <script src="media-controls.js"></script> 6 <script src="media-controls.js"></script>
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
8 (Please avoid writing new tests using video-test.js) -->
7 <script src="video-test.js"></script> 9 <script src="video-test.js"></script>
8 </head> 10 </head>
9 <body> 11 <body>
10 <audio controls></audio> 12 <audio controls></audio>
11 <script> 13 <script>
12 findMediaElement(); 14 findMediaElement();
13 audio.src = findMediaFile("audio", "content/test"); 15 audio.src = findMediaFile("audio", "content/test");
14 testExpected("audio.volume", 1); 16 testExpected("audio.volume", 1);
15 waitForEvent("loadedmetadata", function() 17 waitForEvent("loadedmetadata", function()
16 { 18 {
17 // click the middle of the volume slider 19 // click the middle of the volume slider
18 var coords = mediaControlsButtonCoordinates(audio, "volume-slide r"); 20 var coords = mediaControlsButtonCoordinates(audio, "volume-slide r");
19 eventSender.mouseMoveTo(coords[0], coords[1]); 21 eventSender.mouseMoveTo(coords[0], coords[1]);
20 eventSender.mouseDown(); 22 eventSender.mouseDown();
21 eventSender.mouseUp(); 23 eventSender.mouseUp();
22 24
23 testExpected("audio.volume", 0.4, '>'); 25 testExpected("audio.volume", 0.4, '>');
24 testExpected("audio.volume", 0.6, '<'); 26 testExpected("audio.volume", 0.6, '<');
25 waitForEventAndEnd("volumechange"); 27 waitForEventAndEnd("volumechange");
26 }); 28 });
27 </script> 29 </script>
28 </body> 30 </body>
29 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698