Chromium Code Reviews| 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..9b04f056879c08981cfb7f5cd3cd406474133352 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/js-test.js"></script> |
| +<p id="description"></p> |
| +<select id='top'><option>A</option><option>B</option></select> |
| +<pre id="console"></pre> |
| +<script> |
| +description("Tests to ensure that default action does not occur for untrusted events."); |
| + |
| +function test() |
| +{ |
| + if (window.testRunner) |
| + testRunner.dumpAsText(); |
| + |
| + var node = document.getElementById('top'); |
| + var client = node.getBoundingClientRect(); |
| + |
| + var event = new KeyboardEvent('keydown', { keyIdentifier: 'Down' } ); |
|
tkent
2015/07/17 05:50:41
On Mac, Down key opens the popup. We should dispa
dtapuska
2015/07/21 21:30:05
Done.
|
| + node.dispatchEvent(event); |
| + shouldBeEqualToString("document.getElementById('top').value", "A"); |
| +} |
| + |
| +test(); |
| +</script> |