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

Side by Side Diff: LayoutTests/fast/events/panScroll-click-hyperlink.html

Issue 54473004: Make js-test-post a noop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add mac NeedsRebaselines Created 7 years, 1 month 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 <script> 4 <script>
5 5 window.jsTestIsAsync = true;
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.waitUntilDone() 7 testRunner.waitUntilDone()
8 8
9 var LeftMouseButton = 0; 9 var LeftMouseButton = 0;
10 var MiddleMouseButton = 1; 10 var MiddleMouseButton = 1;
11 11
12 var testContainer; 12 var testContainer;
13 var didClickLink1 = false; 13 var didClickLink1 = false;
14 14
15 window.onload = function() 15 window.onload = function()
(...skipping 20 matching lines...) Expand all
36 36
37 eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetT op + 10); 37 eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetT op + 10);
38 eventSender.mouseDown(MiddleMouseButton); 38 eventSender.mouseDown(MiddleMouseButton);
39 eventSender.mouseUp(MiddleMouseButton); 39 eventSender.mouseUp(MiddleMouseButton);
40 eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetT op + testContainer.offsetHeight); 40 eventSender.mouseMoveTo(testContainer.offsetLeft + 10, testContainer.offsetT op + testContainer.offsetHeight);
41 setTimeout(clickHyperlinksIfScrolledToBottomOtherwiseFail, 500); // 500ms sh ould be reasonable to scroll to the bottom of the <div>. 41 setTimeout(clickHyperlinksIfScrolledToBottomOtherwiseFail, 500); // 500ms sh ould be reasonable to scroll to the bottom of the <div>.
42 } 42 }
43 43
44 function finished() 44 function finished()
45 { 45 {
46 debug('<br /><span class="pass">TEST COMPLETE</span>');
47 document.body.removeChild(document.getElementById("test-container")); 46 document.body.removeChild(document.getElementById("test-container"));
48 if (window.testRunner) 47 finishJSTest();
49 testRunner.notifyDone();
50 } 48 }
51 49
52 function clickHyperlinksIfScrolledToBottomOtherwiseFail() 50 function clickHyperlinksIfScrolledToBottomOtherwiseFail()
53 { 51 {
54 var didScrollToBottom = testContainer.scrollTop === testContainer.scrollHeig ht - testContainer.clientHeight; 52 var didScrollToBottom = testContainer.scrollTop === testContainer.scrollHeig ht - testContainer.clientHeight;
55 if (!didScrollToBottom) { 53 if (!didScrollToBottom) {
56 testFailed("either pan scrolling is disabled or this platform doesn't su pport pan scrolling."); 54 testFailed("either pan scrolling is disabled or this platform doesn't su pport pan scrolling.");
57 finished(); 55 finished();
58 return; 56 return;
59 } 57 }
60 58
61 if (!window.eventSender) 59 if (!window.eventSender)
62 return; 60 return;
63 61
(...skipping 21 matching lines...) Expand all
85 <div id="dummy" style="height:200px"><!-- dummy element to overflow test-con tainer --></div> 83 <div id="dummy" style="height:200px"><!-- dummy element to overflow test-con tainer --></div>
86 <a id="firstLink" href="#" onclick="didClickLink1=true">Link 1</a> <a id="se condLink" href="#" onclick="checkIfClickedLink1AndFinish()">Link 2</a> 84 <a id="firstLink" href="#" onclick="didClickLink1=true">Link 1</a> <a id="se condLink" href="#" onclick="checkIfClickedLink1AndFinish()">Link 2</a>
87 </div> 85 </div>
88 <div id="console"></div> 86 <div id="console"></div>
89 <script> 87 <script>
90 description("This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. <br/>" + 88 description("This test can be used to verify that clicking on a hyperlink is ignored when in pan scroll mode. <br/>" +
91 "Note, this test is expected to fail on the Apple Mac and Chromi um Mac port since they don't support pan scrolling."); 89 "Note, this test is expected to fail on the Apple Mac and Chromi um Mac port since they don't support pan scrolling.");
92 </script> 90 </script>
93 </body> 91 </body>
94 </html> 92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698