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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-async-remove-frame.html

Issue 2235643002: Code cleanup related to unified text checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableUnifiedTextCheckerByDefault
Patch Set: Rebased on removal of grammar-checking code 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> 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 internals.settings.setUnifiedTextCheckerEnabled(true);
9 } 8 }
10 9
11 function runTest() { 10 function runTest() {
12 var textToSelect = "This text should be selected, but this frame shouldn't b e focused."; 11 var textToSelect = "This text should be selected, but this frame shouldn't b e focused.";
13 var frame = document.getElementById("frame"); 12 var frame = document.getElementById("frame");
14 var s = frame.contentDocument.getSelection(); 13 var s = frame.contentDocument.getSelection();
15 s.collapse(frame.contentDocument.body, 0); 14 s.collapse(frame.contentDocument.body, 0);
16 frame.contentDocument.execCommand("InsertText", false, textToSelect); 15 frame.contentDocument.execCommand("InsertText", false, textToSelect);
17 frame.parentNode.removeChild(frame); 16 frame.parentNode.removeChild(frame);
18 window.setTimeout(function() { 17 window.setTimeout(function() {
19 if (window.testRunner) 18 if (window.testRunner)
20 testRunner.notifyDone(); 19 testRunner.notifyDone();
21 }, 50); 20 }, 50);
22 } 21 }
23 </script> 22 </script>
24 </head> 23 </head>
25 <body> 24 <body>
26 <div>PASS unless crash.</div> 25 <div>PASS unless crash.</div>
27 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru nTest();"></iframe> 26 <iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="ru nTest();"></iframe>
28 </body> 27 </body>
29 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698