OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body onload="test(document.getElementById('destination'), document.getElementBy
Id('frame').contentWindow.document);"> | 6 <body onload="test(document.getElementById('destination'), document.getElementBy
Id('frame').contentWindow.document);"> |
7 <div id="container"> | 7 <div id="container"> |
8 <div id="destination" contentEditable></div> | 8 <div id="destination" contentEditable></div> |
9 <iframe id="frame" src="data:text/html,<body contenteditable></body>"></iframe
> | 9 <iframe id="frame" src="data:text/html,<body contenteditable></body>"></iframe
> |
10 </div> | 10 </div> |
(...skipping 24 matching lines...) Expand all Loading... |
35 editableDiv.focus(); | 35 editableDiv.focus(); |
36 document.execCommand("InsertText", false, "zz."); | 36 document.execCommand("InsertText", false, "zz."); |
37 editableBodyInFrame.focus(); | 37 editableBodyInFrame.focus(); |
38 frameDocument.execCommand("InsertText", false, "zz."); | 38 frameDocument.execCommand("InsertText", false, "zz."); |
39 | 39 |
40 if (!window.internals) { | 40 if (!window.internals) { |
41 debug("Automatic testing impossible. Test manually."); | 41 debug("Automatic testing impossible. Test manually."); |
42 return; | 42 return; |
43 } | 43 } |
44 | 44 |
45 internals.settings.setUnifiedTextCheckerEnabled(true); | |
46 | |
47 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, true)', 'true', f
unction() { | 45 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, true)', 'true', f
unction() { |
48 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBodyInFrame, true)
', 'true', function() { | 46 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBodyInFrame, true)
', 'true', function() { |
49 // Turn off spellchecking, all misspellings should disappear. | 47 // Turn off spellchecking, all misspellings should disappear. |
50 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, false)',
'false', function() { | 48 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, false)',
'false', function() { |
51 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBodyInFram
e, false)', 'false', function() { | 49 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBodyInFram
e, false)', 'false', function() { |
52 // Focus element and turn on spellchecking. | 50 // Focus element and turn on spellchecking. |
53 // Only misspellings of the focused element should be restor
ed. | 51 // Only misspellings of the focused element should be restor
ed. |
54 editableDiv.focus(); | 52 editableDiv.focus(); |
55 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, t
rue)', 'true', function() { | 53 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableDiv, t
rue)', 'true', function() { |
56 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBo
dyInFrame, true)', 'false', finishJSTest); | 54 shouldBecomeEqual('hasSpellingMarkerOnSetting(editableBo
dyInFrame, true)', 'false', finishJSTest); |
57 }); | 55 }); |
58 }); | 56 }); |
59 }); | 57 }); |
60 }); | 58 }); |
61 }); | 59 }); |
62 } | 60 } |
63 | 61 |
64 </script> | 62 </script> |
65 </body> | 63 </body> |
66 </html> | 64 </html> |
OLD | NEW |