Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / user-select-js-property.html
blob32cfbd04f1e32ce7c54ae0424135a65626c6548c
1 <script src="../../resources/js-test.js"></script>
2 <div id="container">
3 <p id="description"></p>
4 <div id="sample1" contenteditable="true">editable</div>
5 <div id="sample2" contenteditable="false">uneditable</div>
6 </div>
7 </div>
8 <script>
9 function $(id) { return document.getElementById(id); }
10 description('Test setting CSSStyleDeclaration.webkitUserStyle');
12 var selection = window.getSelection();
13 function setSelection(node)
15 var range = document.createRange();
16 range.selectNodeContents(node);
17 selection.empty();
18 selection.addRange(range);
21 // user-select:none in editable element
22 $('sample1').style.webkitUserSelect = 'none';
23 setSelection($('sample1'));
24 shouldBeEqualToString('selection.type', 'Range');
26 // user-select:none in uneditable element
27 $('sample2').style.webkitUserSelect = 'none';
28 setSelection($('sample2'));
29 shouldBeEqualToString('selection.type', 'None');
31 if (window.testRunner)
32 $('container').outerHTML = '';
33 </script>