Skip to content

Commit

Permalink
Merge pull request web-platform-tests#4360 from w3c/chromium-export-try
Browse files Browse the repository at this point in the history
Fix low risk nullable => non nullable change for NavigatorLanguage.language
  • Loading branch information
jeffcarp authored Dec 16, 2016
2 parents 9c55575 + a1b42a4 commit d338f1a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions uievents/constructors/inputevent-constructor.html
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>

0 comments on commit d338f1a

Please sign in to comment.