-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1764306 [wpt PR 33605] - DOM: Test document.createEvent('toucheve…
…nt'), a=testonly Automatic update from web-platform-tests DOM: Test document.createEvent('touchevent') See whatwg/dom#1071 Co-authored-by: Anne van Kesteren <[email protected]> -- wpt-commits: 75e0de2aa153aea2e31860cd6ec4628b7b673011 wpt-pr: 33605
- Loading branch information
1 parent
17e9151
commit fbf27c7
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
testing/web-platform/tests/dom/nodes/Document-createEvent-touchevent.window.js
This file contains 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,12 @@ | ||
for (const variant of ['TouchEvent', 'touchevent', 'TOUCHEVENT']) { | ||
test(() => { | ||
if (!('ontouchstart' in document)) { | ||
assert_throws_dom("NOT_SUPPORTED_ERR", () => { | ||
document.createEvent(variant); | ||
}); | ||
} else { | ||
document.createEvent(variant); | ||
// The interface and other details of the event is tested in Document-createEvent.https.html | ||
} | ||
}, `document.createEvent('${variant}') should throw if 'expose legacy touch event APIs' is false`); | ||
} |
This file contains 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