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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-input-search-crash.html

Issue 2270293003: Add a switch to TestRunner to enable/disable mock spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use in-class initialization Created 4 years, 4 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 PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 if (window.testRunner)
7 testRunner.setMockSpellCheckerEnabled(true);
8
6 var clicked = false; 9 var clicked = false;
7 10
8 function handleClicked() 11 function handleClicked()
9 { 12 {
10 clicked = true; 13 clicked = true;
11 } 14 }
12 15
13 function test() 16 function test()
14 { 17 {
15 description("This test passes if it doesn't crash and the context menu is sh own for the search input"); 18 description("This test passes if it doesn't crash and the context menu is sh own for the search input");
16 if (!window.eventSender) 19 if (!window.eventSender)
17 return; 20 return;
18 var target = document.getElementById("target"); 21 var target = document.getElementById("target");
19 var clickX = target.offsetLeft + target.offsetWidth - 2; 22 var clickX = target.offsetLeft + target.offsetWidth - 2;
20 var clickY = target.offsetTop + target.offsetHeight / 2; 23 var clickY = target.offsetTop + target.offsetHeight / 2;
21 eventSender.mouseMoveTo(clickX, clickY); 24 eventSender.mouseMoveTo(clickX, clickY);
22 eventSender.contextClick(); 25 eventSender.contextClick();
23 shouldBe("clicked", "true"); 26 shouldBe("clicked", "true");
24 } 27 }
25 </script> 28 </script>
26 </head> 29 </head>
27 <body> 30 <body>
28 <p id="description"></p> 31 <p id="description"></p>
29 <div id="console"></div> 32 <div id="console"></div>
30 <input id="target" type="search" oncontextmenu="handleClicked()"> 33 <input id="target" type="search" oncontextmenu="handleClicked()">
31 <script>test();</script> 34 <script>test();</script>
32 </body> 35 </body>
33 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698