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

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

Issue 21235009: Make sure the last selection gets spell checked when focusing different frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 | LayoutTests/editing/spelling/focusing-other-frame-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <iframe id="frame1" src="data:text/html,<body contenteditable></body>"></iframe>
8 <iframe id="frame2" src="data:text/html,<body contenteditable></body>"></iframe>
9
10 <script>
11
12 description("Last word written in an editable in one frame should be " +
13 "spellchecked when focusing other frame. To test manually type some " +
14 "misspelled word in one frame and focus other frame. The word should be marked." );
15
16 if (window.internals) {
17 internals.settings.setAsynchronousSpellCheckingEnabled(false);
18
19 var frame1 = document.getElementById("frame1");
20 var testEditable1 = frame1.contentWindow.document.createElement("div");
21 testEditable1.setAttribute("contentEditable", "true");
22 frame1.contentWindow.document.body.appendChild(testEditable1);
23 var frame2 = document.getElementById("frame2");
24 var testEditable2 = frame1.contentWindow.document.createElement("div");
25 testEditable2.setAttribute("contentEditable", "true");
26 frame2.contentWindow.document.body.appendChild(testEditable2);
27 testEditable1.focus();
28 frame1.contentWindow.document.execCommand("InsertText", false, "zz");
29 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '0');
30 testEditable2.focus();
31 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '1');
32 } else {
33 alert("Automatic testing impossible. Test manually. See steps in the descrip tion.");
34 }
35 </script>
36 <script src="../../fast/js/resources/js-test-post.js"></script>
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/spelling/focusing-other-frame-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698