OLD | NEW |
| (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> | |
OLD | NEW |