Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / shift-click-user-select-none.html
blob1cf2b84a8dd8b1ba32fab2dafa9d0b887ce66be1
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style type="text/css">
5 .no-select {
6 -webkit-user-select: none;
8 </style>
9 </head>
10 <body>
11 <p id="sample" class="text">some text</p>
12 </body>
13 <script>
14 // When Shift+Click in selection range, and make event target to change to
15 // user-select:none with Mac editing behavior causes crash.
16 // Note: When we have contents other than "p" element, the crash isn't occurred.
17 if (window.testRunner)
18 testRunner.dumpAsText();
20 (function() {
21 var sample = document.getElementById('sample');
22 var selection = window.getSelection();
23 selection.selectAllChildren(sample);
24 sample.addEventListener('mousedown', function(event) {
25 if (event.shiftKey)
26 event.currentTarget.classList.add('no-select');
27 });
29 if (!window.eventSender || !window.internals)
30 return;
31 internals.settings.setEditingBehavior("mac");
32 eventSender.mouseMoveTo(sample.offsetLeft + 5, sample.offsetTop + 5);
33 eventSender.mouseDown(0, ['shiftKey']);
34 document.body.textContent = 'PASS; not crashed';
35 })();
36 </script>
37 </html>