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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-async-remove-frame.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, 3 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 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 testRunner.setMockSpellCheckerEnabled(true);
8 } 9 }
9 10
10 function runTest() { 11 function runTest() {
11 var textToSelect = "This text should be selected, but this frame shouldn't b e focused."; 12 var textToSelect = "This text should be selected, but this frame shouldn't b e focused.";
12 var frame = document.getElementById("frame"); 13 var frame = document.getElementById("frame");
13 var s = frame.contentDocument.getSelection(); 14 var s = frame.contentDocument.getSelection();
14 s.collapse(frame.contentDocument.body, 0); 15 s.collapse(frame.contentDocument.body, 0);
15 frame.contentDocument.execCommand("InsertText", false, textToSelect); 16 frame.contentDocument.execCommand("InsertText", false, textToSelect);
16 frame.parentNode.removeChild(frame); 17 frame.parentNode.removeChild(frame);
17 window.setTimeout(function() { 18 window.setTimeout(function() {
18 if (window.testRunner) 19 if (window.testRunner)
19 testRunner.notifyDone(); 20 testRunner.notifyDone();
20 }, 50); 21 }, 50);
21 } 22 }
22 </script> 23 </script>
23 </head> 24 </head>
24 <body> 25 <body>
25 <div>PASS unless crash.</div> 26 <div>PASS unless crash.</div>
26 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru nTest();"></iframe> 27 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru nTest();"></iframe>
27 </body> 28 </body>
28 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698