Index: LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html |
diff --git a/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html b/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c36d5d43ffce9db497b1ca2cba24da5131708bba |
--- /dev/null |
+++ b/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html |
@@ -0,0 +1,19 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<p id="description"></p> |
+<form> |
+<input type="radio" id="radio1" name="foo" value="A" checked/> |
+<input type="radio" id="radio2" name="foo" value="B" /> |
+</form> |
+<pre id="console"></pre> |
+<script> |
+description("Tests to ensure that default action does not occur for untrusted events."); |
+ |
+var node = document.getElementById('radio1'); |
+node.getBoundingClientRect(); |
+ |
+var event = new KeyboardEvent('keydown', { keyIdentifier: 'Down' } ); |
+node.dispatchEvent(event); |
+shouldBeTrue("document.getElementById('radio1').checked"); |
+shouldBeFalse("document.getElementById('radio2').checked"); |
+</script> |