6 border:
1px solid black;
9 -webkit-user-select: all;
10 -moz-user-select: all;
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>
16 <div id=
"first" class=
"select-all">First element
</div>
18 <div id=
"second" class=
"select-all">Second element
</div>
20 <script src=
"../../resources/dump-as-markup.js"></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
) {