Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions html/editing/dnd/drop/001.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>dropEffect is correctly set when it matches effectAllowed</title>
Expand Down Expand Up @@ -59,17 +60,11 @@
async function test() {
await new Promise(loaded => window.addEventListener("load", loaded));

function onDropCallBack(event) {
assert_equals(event.target.textContent, event.dataTransfer.dropEffect);
assert_equals(event.target.textContent, event.dataTransfer
.effectAllowed);
return true;
}
for (const effect of ['copy', 'move', 'link']) {
const dragDiv = document.getElementById(effect + '-drag');
const dropDiv = document.getElementById(effect + '-drop');
dragDropTest(
dragDiv, dropDiv, onDropCallBack,
dragDiv, dropDiv, dropEffectOnDropCallBack,
'dropEffect should match effectAllowed on drop for ' + effect);
}
}
Expand Down
1 change: 1 addition & 0 deletions html/editing/dnd/drop/002.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>Text input selection drag and drop: allowed effects
Expand Down
1 change: 1 addition & 0 deletions html/editing/dnd/drop/003.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>dropEffect matches effectAllowed for link drag and drop</title>
Expand Down
1 change: 1 addition & 0 deletions html/editing/dnd/drop/004.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>dropEffect matches effectAllowed for PNG image drag and drop</title>
Expand Down
1 change: 1 addition & 0 deletions html/editing/dnd/drop/005.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>SVG image drag and drop: allowed effects 'copy','move','link'</title>
Expand Down
1 change: 1 addition & 0 deletions html/editing/dnd/drop/006.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>Canvas drag and drop: allowed effects 'copy','move','link'</title>
Expand Down
37 changes: 37 additions & 0 deletions html/editing/dnd/drop/029.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>
<head>
<title>Test all effectAllowed against none dropEffect on drop</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}
</style>
</head>
<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-none" ondragOver="onDragOver(event, 'none')">none</div>
</p>
</body>
<script>
runDropEffectTest(/*runDropTest=*/true, 'none');
</script>
</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/030.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against copy dropEffect on drop</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-copy" ondragOver="onDragOver(event, 'copy')">copy</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/true, 'copy');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/031.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against link dropEffect on drop</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-link" ondragOver="onDragOver(event, 'link')">link</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/true, 'link');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/032.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against move dropEffect on drop</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-move" ondragOver="onDragOver(event, 'move')">move</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/true, 'move');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/033.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against dummy dropEffect on drop</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-dummy" ondragOver="onDragOver(event, 'dummy')">dummy</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/true, 'dummy');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/034.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against none dropEffect on dragEnd</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-none" ondragOver="onDragOver(event, 'none')">none</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/false, 'none');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/035.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against copy dropEffect on dragEnd</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-copy" ondragOver="onDragOver(event, 'copy')">copy</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/false, 'copy');
</script>

</html>
41 changes: 41 additions & 0 deletions html/editing/dnd/drop/036.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="support/dropEffect-test-helper.js"></script>
<script src="../resources/test-helper.js"></script>

<head>
<title>Test all effectAllowed against link dropEffect on dragEnd</title>
<style>
div {
display: inline-block;
vertical-align: top;
background-color: olive;
color: white;
margin-left: 20px;
margin-top: 20px;
width: 75px;
height: 75px;
font-size: small;
}

</style>
</head>

<body>
<p>These are the draggable elements with different effectAllowed
settings:
<p id="drag-container"> </p>
</p>
<p> Drop targets with different dropEffects:
<div id="drop-link" ondragOver="onDragOver(event, 'link')">link</div>
</p>
</body>
<script>
runDropEffectTest(/*testDropEvent=*/false, 'link');
</script>

</html>
Loading