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

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: Check window.internals existence. 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
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></body>"></iframe>
8 <iframe id="frame2" src="data:text/html,<body></body>"></iframe>
9
10 <script>
11
12 description("Editable in one frame should be spellchecked when focusing other fr ame.");
13
14 if (window.internals) {
15 internals.settings.setAsynchronousSpellCheckingEnabled(false);
16
17 var frame1 = document.getElementById("frame1");
18 var testEditable1 = frame1.contentWindow.document.createElement("div");
19 testEditable1.setAttribute("contentEditable", "true");
20 frame1.contentWindow.document.body.appendChild(testEditable1);
21 var frame2 = document.getElementById("frame2");
22 var testEditable2 = frame1.contentWindow.document.createElement("div");
23 testEditable2.setAttribute("contentEditable", "true");
24 frame2.contentWindow.document.body.appendChild(testEditable2);
25 testEditable1.focus();
26 frame1.contentWindow.document.execCommand("InsertText", false, "zz");
27 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '0');
28 testEditable2.focus();
29 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '1');
30 } else {
31 alert("Automatic testing impossible.");
tony 2013/08/02 20:35:03 This should say that the test requires content_she
please use gerrit instead 2013/08/02 20:41:37 In addition, it would be better to use log() funct
32 }
33 </script>
34 <script src="../../fast/js/resources/js-test-post.js"></script>
35 </body>
36 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/spelling/focusing-other-frame-expected.txt » ('j') | Source/core/editing/Editor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698