forked from web-platform-tests/wpt
-
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.
DOM: Test document.createEvent('touchevent')
See whatwg/dom#1071 Co-authored-by: Anne van Kesteren <[email protected]>
- Loading branch information
1 parent
bd96e09
commit 016db52
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
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