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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short.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 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 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 10
11 description('For bug cr571988: Spell checking for pasted mixed content.'); 11 description('For bug cr571988: Spell checking for pasted mixed content.');
12 12
13 jsTestIsAsync = true; 13 jsTestIsAsync = true;
14 if (window.testRunner)
15 testRunner.setMockSpellCheckerEnabled(true);
14 16
15 var testRoot = document.createElement("div"); 17 var testRoot = document.createElement("div");
16 document.body.insertBefore(testRoot, document.body.firstChild); 18 document.body.insertBefore(testRoot, document.body.firstChild);
17 19
18 var testEditable = document.createElement("div"); 20 var testEditable = document.createElement("div");
19 testEditable.setAttribute("contentEditable", "true"); 21 testEditable.setAttribute("contentEditable", "true");
20 testRoot.appendChild(testEditable); 22 testRoot.appendChild(testEditable);
21 23
22 var testSourceDecorated = document.createElement("div"); 24 var testSourceDecorated = document.createElement("div");
23 testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz zz."; 25 testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz zz.";
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 80 }
79 }; 81 };
80 82
81 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, testSo urceDecorated.innerHTML.match(/zz/g).length); }); 83 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, testSo urceDecorated.innerHTML.match(/zz/g).length); });
82 done(); 84 done();
83 85
84 var successfullyParsed = true; 86 var successfullyParsed = true;
85 </script> 87 </script>
86 </body> 88 </body>
87 </html> 89 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698