Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / user-select-all-with-shift.html
blob880e23b8a3e2cdb62a312e70214fc67d951dc610
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <style>
5 .select-all {
6 border: 1px solid black;
7 height: 100px;
8 width: 100px;
9 -webkit-user-select: all;
10 -moz-user-select: all;
12 </style>
13 <p id="description">This tests shift + selecting two discontinuous elements with user-select: all. WebKit should select the both elements instead of moving the selection.
14 To manually test, click to select the first element and shift-click the second element. WebKit should select both elements.</p>
15 <div id="test">
16 <div id="first" class="select-all">First element</div>
17 Some other text.
18 <div id="second" class="select-all">Second element</div>
19 </div>
20 <script src="../../resources/dump-as-markup.js"></script>
21 <script>
23 Markup.description(document.getElementById('description').textContent);
25 function clickOnElement(element, keys) {
26 eventSender.mouseMoveTo(element.offsetLeft + 10, element.offsetTop + 10);
27 eventSender.mouseDown(0, keys);
28 eventSender.mouseUp(0, keys);
31 function runTest(editingBehavior) {
32 internals.settings.setEditingBehavior(editingBehavior);
34 var postfix = ' (' + editingBehavior + ')';
36 clickOnElement(document.getElementById('first'));
37 Markup.dump('test', 'After clicking on the first element' + postfix);
38 eventSender.leapForward(300);
39 clickOnElement(document.getElementById('second'), ['shiftKey']);
40 Markup.dump('test', 'After shift clicking on the second element' + postfix);
42 getSelection().removeAllRanges();
44 clickOnElement(document.getElementById('second'));
45 Markup.dump('test', 'After clicking on the second element' + postfix);
46 eventSender.leapForward(300);
47 clickOnElement(document.getElementById('first'), ['shiftKey']);
48 Markup.dump('test', 'After shift clicking on the first element' + postfix);
51 if (window.eventSender) {
52 runTest('Mac');
53 runTest('Win');
54 runTest('Unix');
56 } else
57 Markup.noAutoDump();
59 </script>
60 </body>
61 </html>