diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml b/testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml new file mode 100644 index 0000000000..2c7d3b9191 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/events/003-1.xhtml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Cross frame drag and drop: helper file</title> +<style type="text/css"> +div + {width:0; + height:0; + border:solid 50px silver; + border-radius:50px; + margin-left:auto;} +</style> +<script type="application/ecmascript"> +var step = 1; +function start(event) + {if(step++ == 1) + {setColor('green silver silver silver');} + else + {step = 0; + setColor('maroon'); + say('Dragstart should be first event to fire.')} + } +function leavePage(event) + {if(step++ > 1) + {setColor('green green silver silver')} + else + {step = 0; + setColor('maroon'); + say('Dragleave should fire after dragstart.')} + } +function endDrag(event) + {if(step++ > 2) + {setColor('green')} + else + {step = 0; + setColor('maroon'); + say('Dragend should fire after dragstart and dragleave.')} + } +function say(it) + {document.querySelector('pre').appendChild(document.createTextNode(it + '\n'))} +function setColor(c) + {document.querySelector('div').setAttribute('style','border-color:' + c)} +</script> +</head> +<body ondragleave="leavePage(event)"> +<p><a href="data:text/plain,1" ondragstart="start(event)" ondragend="endDrag(event)">Drag me</a></p> +<p>Drag link to the frame below and drop it there. Both circles should turn green once link is dropped into lower frame.</p> +<div/> +<pre/> +</body> +</html> |