-
Notifications
You must be signed in to change notification settings - Fork 3.4k
UIEvents: Tentative test for textInput with drag and drop #44744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7979639
UIEvents: Tentative test for textInput with drag and drop
zcorpan 5c2f5b4
Use -manual file name flags
zcorpan 87eed48
Test events on the drag source. Test source and target being the same…
zcorpan d93dfbb
Test relative event order between source and target
zcorpan 3afeb04
Test e.inputType
zcorpan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
html/editing/dnd/drop/events-contenteditable.tentative.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>Selection drag and drop: events for <input></title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
[data-placeholder]:empty::before { content: attr(data-placeholder); } | ||
</style> | ||
<div><input id=a value="Drag me"></div> | ||
<div contenteditable=true id=b data-placeholder="...to here"></div> | ||
<script> | ||
setup({ explicit_timeout: true, single_test: true }); | ||
const a = document.getElementById('a'); | ||
const b = document.getElementById('b'); | ||
const actualEvents = []; | ||
const expectedEvents = ['drop', 'beforeinput', 'textInput', 'input']; | ||
for (const eventType of expectedEvents) { | ||
b.addEventListener(eventType, e => { | ||
actualEvents.push(e.type); | ||
if (actualEvents.length === expectedEvents.length) { | ||
assert_array_equals(actualEvents, expectedEvents); | ||
done(); | ||
} | ||
}); | ||
} | ||
a.select(); | ||
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>Selection drag and drop: events for <input></title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<div><input id=a value="Drag me"></div> | ||
<div><input id=b placeholder="...to here"></div> | ||
<script> | ||
setup({ explicit_timeout: true, single_test: true }); | ||
const a = document.getElementById('a'); | ||
const b = document.getElementById('b'); | ||
const actualEvents = []; | ||
const expectedEvents = ['drop', 'beforeinput', 'textInput', 'input']; | ||
for (const eventType of expectedEvents) { | ||
b.addEventListener(eventType, e => { | ||
actualEvents.push(e.type); | ||
if (actualEvents.length === expectedEvents.length) { | ||
assert_array_equals(actualEvents, expectedEvents); | ||
done(); | ||
} | ||
}); | ||
} | ||
a.select(); | ||
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<title>Selection drag and drop: events for <input></title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<div><input id=a value="Drag me"></div> | ||
<div><textarea id=b placeholder="...to here"></textarea></div> | ||
<script> | ||
setup({ explicit_timeout: true, single_test: true }); | ||
const a = document.getElementById('a'); | ||
const b = document.getElementById('b'); | ||
const actualEvents = []; | ||
const expectedEvents = ['drop', 'beforeinput', 'textInput', 'input']; | ||
for (const eventType of expectedEvents) { | ||
b.addEventListener(eventType, e => { | ||
actualEvents.push(e.type); | ||
if (actualEvents.length === expectedEvents.length) { | ||
assert_array_equals(actualEvents, expectedEvents); | ||
done(); | ||
} | ||
}); | ||
} | ||
a.select(); | ||
</script> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.