OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 Here is a text node you can't select. | 7 <div inert>Here is a text node you can't select.</div> |
8 <dialog>I'm selectable.</dialog> | 8 <div>I'm selectable.</div> |
9 <script> | 9 <script> |
10 description('Test that inert nodes cannot be selected. The test passes if the on
ly text you can select is inside the dialog.'); | |
11 | |
12 dialog = document.querySelector('dialog'); | |
13 dialog.showModal(); | |
14 document.execCommand('SelectAll'); | 10 document.execCommand('SelectAll'); |
15 shouldBeEqualToString('window.getSelection().toString()', "I'm selectable."); | 11 shouldBeEqualToString('window.getSelection().toString()', "I'm selectable."); |
| 12 |
| 13 description('Test that inert nodes cannot be selected. The test passes if the on
ly text you can select is inside the non-inert div.'); |
16 </script> | 14 </script> |
17 </body> | 15 </body> |
18 </html> | 16 </html> |
OLD | NEW |