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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls-right-click-on-timebar.html

Issue 2021693002: Convert controls-* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/controls-right-click-on-timebar-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!DOCTYPE html>
2 <head> 2 <title>Test that right clicking on the timebar does not cause a seek.</title>
3 <title>right click on timebar test</title> 3 <script src="../resources/testharness.js"></script>
4 <script src=media-controls.js></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src=media-file.js></script> 5 <script src="media-file.js"></script>
6 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 6 <script src="media-controls.js"></script>
7 (Please avoid writing new tests using video-test.js) --> 7 <video controls></video>
8 <script src=video-test.js></script> 8 <script>
9 <script> 9 async_test(function(t) {
10 if (window.testRunner) 10 var video = document.querySelector("video");
11 testRunner.dumpAsText();
12 11
13 function click() 12 video.onplaying = t.step_func(function() {
14 { 13 setTimeout(t.step_func(click), 100);
15 if (window.eventSender) { 14 });
16 var seekCoords;
17 try {
18 seekCoords = mediaControlsButtonCoordinates(video, "time line");
19 } catch (exception) {
20 failTest(exception.description);
21 return;
22 }
23 var x = seekCoords[0];
24 var y = seekCoords[1];
25 15
26 eventSender.mouseMoveTo(x, y); 16 video.onseeked = t.unreached_func();
27 eventSender.contextClick();
28 }
29 window.setTimeout("endTest()", 200);
30 }
31 17
32 function playing() 18 video.autoplay = true;
33 { 19 video.src = findMediaFile("video", "content/test");
34 window.setTimeout("click()", 100);
35 }
36 20
37 function seeked() 21 function click() {
38 { 22 var seekCoords = mediaControlsButtonCoordinates(video, "timeline");
39 failTest("Should not seek.");
40 }
41 23
42 function start() 24 eventSender.mouseMoveTo(seekCoords[0], seekCoords[1]);
43 { 25 eventSender.contextClick();
44 findMediaElement();
45 waitForEvent('playing', playing);
46 waitForEvent('seeked', seeked);
47 run("video.autoplay = true");
48 disableFullTestDetailsPrinting();
49 runSilently("video.src = '" + findMediaFile("video", "content/te st") + "'");
50 enableFullTestDetailsPrinting();
51 }
52 </script>
53 </head>
54 26
55 <body onload="start()"> 27 setTimeout(t.step_func_done(), 200);
56 <p>Test that right clicking on the timebar does not cause a seek.</p> 28 }
57 <video controls></video> 29 });
58 </body> 30 </script>
59 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/controls-right-click-on-timebar-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698