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

Side by Side Diff: LayoutTests/editing/spelling/spellcheck-editable-on-focus.html

Issue 23389005: Fix editing/spelling/spellcheck-editable-on-focus.html's flakiness (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../editing.js"></script> 4 <script src="../editing.js"></script>
5 <script src="resources/util.js"></script> 5 <script src="resources/util.js"></script>
6 <script src="../../fast/js/resources/js-test-pre.js"></script> 6 <script src="../../fast/js/resources/js-test-pre.js"></script>
7 </head> 7 </head>
8 <body onload="test();"> 8 <body onload="test();">
9 <pre id="console"></pre> 9 <pre id="console"></pre>
10 <div id="container"> 10 <div id="container">
(...skipping 18 matching lines...) Expand all
29 return; 29 return;
30 } 30 }
31 31
32 internals.settings.setUnifiedTextCheckerEnabled(true); 32 internals.settings.setUnifiedTextCheckerEnabled(true);
33 internals.settings.setAsynchronousSpellCheckingEnabled(true); 33 internals.settings.setAsynchronousSpellCheckingEnabled(true);
34 internals.setContinuousSpellCheckingEnabled(true); 34 internals.setContinuousSpellCheckingEnabled(true);
35 35
36 function waitForMarkersToAppear(nretry) 36 function waitForMarkersToAppear(nretry)
37 { 37 {
38 if (nretry > 0 38 if (nretry > 0
39 && !internals.markerCountForNode(findFirstTextNode(testEditable), "s pelling") 39 && (!internals.markerCountForNode(findFirstTextNode(testEditable), " spelling")
40 && !internals.markerCountForNode(findFirstTextNode(testTextArea), "s pelling") 40 || !internals.markerCountForNode(findFirstTextNode(testTextArea), "s pelling")
41 && !internals.markerCountForNode(findFirstTextNode(testTextField), " spelling")) { 41 || !internals.markerCountForNode(findFirstTextNode(testTextField), " spelling"))) {
42 window.setTimeout(function() { waitForMarkersToAppear(nretry - 1); } , 5); 42 window.setTimeout(function() { waitForMarkersToAppear(nretry - 1); } , 5);
43 } else { 43 } else {
44 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextAre a), "spelling")', '3'); 44 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextAre a), "spelling")', '3');
45 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditabl e), "spelling")', '3'); 45 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditabl e), "spelling")', '3');
46 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextFie ld), "spelling")', '3'); 46 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextFie ld), "spelling")', '3');
47 if (window.testRunner) 47 if (window.testRunner)
48 testRunner.notifyDone(); 48 testRunner.notifyDone();
49 } 49 }
50 } 50 }
51 51
52 if (window.testRunner) { 52 if (window.testRunner) {
53 testRunner.dumpAsText(); 53 testRunner.dumpAsText();
54 testRunner.waitUntilDone(); 54 testRunner.waitUntilDone();
55 } 55 }
56 56
57 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spe lling")', '0'); 57 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spe lling")', '0');
58 testEditable.focus(); 58 testEditable.focus();
59 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spe lling")', '0'); 59 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spe lling")', '0');
60 testTextArea.focus(); 60 testTextArea.focus();
61 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "sp elling")', '0'); 61 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "sp elling")', '0');
62 testTextField.focus(); 62 testTextField.focus();
63 waitForMarkersToAppear(10); 63 waitForMarkersToAppear(10);
64 } 64 }
65 65
66 </script> 66 </script>
67 <script src="../../fast/js/resources/js-test-post.js"></script> 67 <script src="../../fast/js/resources/js-test-post.js"></script>
68 </body> 68 </body>
69 </html> 69 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698