Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / spelling / spelling-should-select-multiple-words.html
blob76986e5f5c2caf1a808832dbda8504cd81307878
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/util.js"></script>
6 </head>
7 <body>
8 <div id="container">
9 <div id="destination" contentEditable></div>
10 </div>
11 <script>
13 description("Spell check should select multi-word misspellings on context click. "+
14 "To test manually, enable 'Ask Google for Suggestions' in Chrome, type 'It should be upper case.', and context-click on the word 'upper'. " +
15 "The test succeeds when 'upper case' was selected after context click.");
17 initSpellTest("destination", "It should be upper case.", function(textNode) {
18 var behaviors = ["win", "mac"];
19 for (var i = 0; i < behaviors.length; i++) {
20 internals.settings.setEditingBehavior(behaviors[i]);
22 spellingMarkerRange = internals.markerRangeForNode(textNode, "spelling", 0);
23 shouldBeEqualToString("spellingMarkerRange.toString()", "upper case");
24 shouldBeEqualToString("window.getSelection().toString()", "");
26 // Context click on "upper case" to show the context menu.
27 var x = destination.offsetParent.offsetLeft + destination.offsetLeft + 100;
28 var y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
29 eventSender.mouseMoveTo(x, y);
30 contextMenuElements = eventSender.contextClick();
31 // Esc key to hide the context menu.
32 eventSender.keyDown("escape", null);
34 spellingMarkerRange = internals.markerRangeForNode(textNode, "spelling", 0);
35 shouldBeEqualToString("spellingMarkerRange.toString()", "upper case");
36 shouldBeEqualToString("window.getSelection().toString()", "upper case");
37 shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "uppercase");
39 window.getSelection().removeAllRanges();
41 });
43 </script>
44 </body>
45 </html>