blob: 76e5928c18e482bc5906ab218cde9bfd2c867fa4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<!doctype html>
<title>Test for bug 1848158</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<input id="input" type="date" value="1998-01-22">
<script>
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
let value = input.value;
input.addEventListener("keydown", function(e) {
e.preventDefault();
});
isnot(value, "", "should have a value");
input.focus();
synthesizeKey("KEY_Backspace");
is(input.value, value, "Value shouldn't change");
SimpleTest.finish();
});
</script>
|