Backed out 5 changesets (bug 1694229) for geckoview failures. CLOSED TREE
[gecko.git] / testing / web-platform / tests / html / editing / dnd / platform / html-to-os.html
blob5aaf33b42b70037c03f324a99bebc2b9bf00732e
1 <!doctype html>
2 <html>
3 <head>
4 <title>drag and drop - dragging HTML onto the OS</title>
5 </head>
6 <body>
8 <p>This test is only relevant on platforms where it is possible to switch applications in mid-drag (eg. alt+tab, dragging over taskbar buttons, dragging between restored windows).</p>
9 <p>This testcase requires an external application that accepts dropping of HTML from other applications - eg. Google Chrome and Internet Explorer (not Firefox). Load <a href="html-to-os-HELPER-FILE.html">the helper file</a> in the external application.</p>
10 <p draggable="true">Drag this paragraph to the other application and release it. De-select the text in that application if it is selected. Pass if &quot;Pass if this text is on a green background&quot; appears in the other application, and if it has a green background, and if the drag placeholder disappears when the drag is released.</p>
11 <script type="text/javascript">
12 document.getElementsByTagName('p')[2].ondragstart = function (e) {
13 e.dataTransfer.effectAllowed = 'copy';
14 e.dataTransfer.setData('text/html', '<span style="background:lime;color:black;">Pass if this text is on a green background</span>');
16 </script>
17 <p>Disable JavaScript in this browser and repeat the test. Pass if the entire dragged paragraph appears in the other application. Vendors may optionally choose to ignore this requirement.</p>
19 </body>
20 </html>