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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/grammar-markers-hidpi.html

Issue 2211813002: Revert removal of grammar checking and marking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="source" contenteditable="true" spellcheck="false">You has the right.</d iv>
8 <div id="target" contenteditable="true" spellcheck="true"></div>
9
10 <script>
11 description('This tests whether WebKit can render grammar markers when pasting t ext if it has a grammar-checker. To test manually, copy the text in the first di v element and paste it to the second div element. This test succeeds when WebKit renders a grammar marker under a word "has".');
12
13 jsTestIsAsync = true;
14
15 function verifyGrammarMarker(destination, ungrammaticalPhrase)
16 {
17 if (internals.hasGrammarMarker(document, destination.innerHTML.indexOf(ungra mmaticalPhrase), ungrammaticalPhrase.length)) {
18 testPassed("ungrammatical phrase '" + ungrammaticalPhrase + "' on '" + d estination.innerHTML + "'");
19 return true;
20 } else
21 return false;
22 }
23
24 if (window.testRunner) {
25 testRunner.dumpAsTextWithPixelResults();
26 testRunner.setBackingScaleFactor(2, function () {
27 shouldBecomeEqual('verifyGrammarMarker(target, "has")', 'true', finishJS Test);
28 });
29 }
30
31 var source = document.getElementById('source');
32 window.getSelection().selectAllChildren(source);
33 document.execCommand('Copy');
34 var target = document.getElementById('target');
35 window.getSelection().selectAllChildren(target);
36 document.execCommand('Paste');
37
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698