| This test verifies that navigator.clipboard.writeText sanitizes 'text/html'. To manually run the test, click the button in the subframe below to copy HTML, and then click the paste button. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS Wrote markup to the clipboard. |
| PASS finishedCopying became true |
| PASS Read items from the clipboard. |
| PASS items.length is 2 |
| PASS items[0].types is ['text/html'] |
| PASS fragment1.documentElement.textContent is "Hello world 1" |
| PASS fragment1.querySelector('p') is non-null. |
| PASS fragment1.querySelector('script') is null |
| PASS fragment1.querySelector('p').onclick is null |
| PASS items[1].types is ['text/html'] |
| PASS fragment2.documentElement.textContent is "Hello world 2" |
| PASS fragment2.querySelector('span') is non-null. |
| PASS fragment2.querySelector('p') is null |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |