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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/script-tests/spelling-hasspellingmarker.js

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 description('This tests if internals.hasSpellingMarker works for differnt type o f elements. ' 1 description('This tests if internals.hasSpellingMarker works for differnt type o f elements. '
2 + 'This test succeds when there are four elements having "zz ". ' 2 + 'This test succeds when there are four elements having "zz ". '
3 + 'However, only the last one should not contatin spelling marker.'); 3 + 'However, only the last one should not contatin spelling marker.');
4 4
5 jsTestIsAsync = true; 5 jsTestIsAsync = true;
6 if (window.testRunner)
7 testRunner.setMockSpellCheckerEnabled(true);
6 8
7 var testRoot = document.createElement("div"); 9 var testRoot = document.createElement("div");
8 document.body.insertBefore(testRoot, document.body.firstChild); 10 document.body.insertBefore(testRoot, document.body.firstChild);
9 11
10 function addContainer(markup) 12 function addContainer(markup)
11 { 13 {
12 var contatiner = document.createElement("div"); 14 var contatiner = document.createElement("div");
13 contatiner.innerHTML = markup; 15 contatiner.innerHTML = markup;
14 testRoot.appendChild(contatiner); 16 testRoot.appendChild(contatiner);
15 17
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return setTimeout(verifySpellingMarkers(nextTestCase), 0); 51 return setTimeout(verifySpellingMarkers(nextTestCase), 0);
50 52
51 if (window.internals) 53 if (window.internals)
52 testRoot.style.display = "none"; 54 testRoot.style.display = "none";
53 55
54 finishJSTest(); 56 finishJSTest();
55 } 57 }
56 done(); 58 done();
57 59
58 var successfullyParsed = true; 60 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698