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.
Merge pull request web-platform-tests#4360 from w3c/chromium-export-try
Fix low risk nullable => non nullable change for NavigatorLanguage.language
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 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,25 @@ | ||
<!DOCTYPE html> | ||
<title>InputEvent Constructor Tests</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
test(function() { | ||
var e = new InputEvent('type'); | ||
assert_equals(e.data, null); | ||
assert_false(e.isComposing); | ||
}, 'InputEvent constructor without InputEventInit.'); | ||
|
||
test(function() { | ||
var e = new InputEvent('type', { data: null, isComposing: true }); | ||
assert_equals(e.data, null); | ||
assert_true(e.isComposing); | ||
}, 'InputEvent construtor with InputEventInit where data is null'); | ||
|
||
test(function() { | ||
assert_equals(new InputEvent('type', { data: ''}).data, ''); | ||
}, 'InputEvent construtor with InputEventInit where data is empty string'); | ||
|
||
test(function() { | ||
assert_equals(new InputEvent('type', { data: 'data' }).data, 'data'); | ||
}, 'InputEvent construtor with InputEventInit where data is non empty string'); | ||
</script> |