2 <script src=
"../../resources/js-test.js"></script>
4 You should run this test with DRT. To test manually, please do following:
6 <li>Select select element in box after
"Copy from"</li>
7 <li>Cut selection into clipboard
</li>
8 <li>Paste it into box below
"Paste to"
11 <div id=
"copy" contenteditable=
"true" style=
"border: solid 1px red">
15 <option>Three
</option>
19 <div id=
"paste" contenteditable=
"true" style=
"border: solid 1px red"></div>
22 description('This tests copy/paste of select elements. All the options should be included.');
24 if (window
.testRunner
) {
25 var copy
= document
.getElementById('copy');
27 document
.execCommand('SelectAll');
28 document
.execCommand('Cut');
30 shouldBeTrue('document.getElementById("select") === null');
32 var paste
= document
.getElementById('paste');
34 document
.execCommand('Paste');
36 var select
= document
.getElementById('select');
37 shouldBeEqualToString('select.options[0].value', 'One');
38 shouldBeEqualToString('select.options[1].value', 'Two');
39 shouldBeEqualToString('select.options[2].value', 'Three');
41 document
.getElementById('container').outerHTML
= '';