Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / 5354455-1.html
blob6361c2e2200f788ccf0b44a08e77539aca87bb35
1 <p>This tests whether right clicking on a paragraph break in editable content selects it. The break should be selected on OS X, but not on Windows or Unix. To run it manually, right click on the paragraph break after the first paragraph below.</p>
2 <div id="div" contenteditable="true">
3 <div><span id="text">The following paragraph break should be selected on OS X.</span></div>
4 <br>
5 </div>
6 <p>Mac: <span id="resultmac">RUNNING</span></p>
7 <p>Win: <span id="resultwin">RUNNING</span></p>
8 <p>Unix: <span id="resultunix">RUNNING</span></p>
9 <p>Android: <span id="resultandroid">RUNNING</span></p>
11 <script>
12 function test(platform, result) {
13 window.getSelection().removeAllRanges();
14 internals.settings.setEditingBehavior(platform);
16 paragraph = document.getElementById("text");
17 x = paragraph.offsetParent.offsetLeft + paragraph.offsetLeft + paragraph.offsetWidth + 10;
18 y = paragraph.offsetParent.offsetTop + paragraph.offsetTop + paragraph.offsetHeight / 2;
19 eventSender.mouseMoveTo(x, y);
20 // Give the editable region focus.
21 eventSender.mouseDown();
22 eventSender.mouseUp();
23 // Right click on the paragraph break to select it.
24 eventSender.contextClick();
25 // esc key to kill the context menu.
26 eventSender.keyDown("escape", null);
28 document.getElementById(result).innerHTML = window.getSelection().type;
31 if (window.eventSender && window.testRunner && window.internals) {
32 testRunner.dumpAsText();
34 test('mac', 'resultmac');
35 test('win', 'resultwin');
36 test('unix', 'resultunix');
37 test('android', 'resultandroid');
39 </script>