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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/focusing-other-frame.html

Issue 2734013002: Implement cold mode invocation for idle time spell checker (Closed)
Patch Set: rebased Mar 7 Created 3 years, 9 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/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="resources/util.js"></script>
7 </head>
8 <body>
9 <pre id="console"></pre>
10 <iframe id="frame1"></iframe>
11 <iframe id="frame2"></iframe>
12
13 <script>
14 var frame1 = document.getElementById('frame1');
15 var testEditable1 = frame1.contentWindow.document.createElement('div');
16 testEditable1.setAttribute('contentEditable', 'true');
17 frame1.contentWindow.document.body.appendChild(testEditable1);
18 var frame2 = document.getElementById('frame2');
19 var testEditable2 = frame2.contentWindow.document.createElement('div');
20 testEditable2.setAttribute('contentEditable', 'true');
21 frame2.contentWindow.document.body.appendChild(testEditable2);
22
23 var steps = [
24 function() {
25 testEditable1.focus();
26 frame1.contentWindow.document.execCommand('InsertText', false, 'zz');
27 },
28 function() {
29 testEditable2.focus();
30 }
31 ];
32
33 var assertions = [
34 () => assert_equals(internals.markerCountForNode(testEditable1.childNodes[0] , 'spelling'), 0),
35 () => assert_equals(internals.markerCountForNode(testEditable1.childNodes[0] , 'spelling'), 1)
36 ];
37
38 runSpellingTest(steps, assertions,'Text written in an editable in one frame shou ld be spellchecked when focusing other frame')
39 </script>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698