Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html

Issue 2070053004: Enable do not allow default action for untrusted events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html b/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
deleted file mode 100644
index 7362794eded6da2202f155a0008701406574b30b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<p>This tests that modifier keys are propagated to the fake mouse event created when you press return and a link has focus.</p>
-<p>If the test succeeds, you should see six "PASS" messages below.</p>
-<p>This is the <a id="link" href="#" onclick="checkKeyState(event)" onmousedown="checkKeyState(event)" onmouseuup="checkKeyState(event)">link</a> used for testing.</p>
-<pre id="console">
-</pre>
-<script>
-
-if (window.testRunner)
- testRunner.dumpAsText();
-
-var link = document.getElementById("link");
-link.focus();
-
-var expectedCtrl;
-var expectedAlt;
-var expectedShift;
-var expectedMeta;
-
-function test(ctrlKey, altKey, shiftKey, metaKey)
-{
- expectedCtrl = ctrlKey;
- expectedAlt = altKey;
- expectedShift = shiftKey;
- expectedMeta = metaKey;
- var event = new KeyboardEvent("keydown", {bubbles: true, cancelable: true, view: document.defaultView, key: "Enter", ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey});
- link.dispatchEvent(event);
-}
-
-function checkKeyState(event)
-{
- if (event.ctrlKey == expectedCtrl && event.altKey == expectedAlt && event.shiftKey == expectedShift && event.metaKey == expectedMeta)
- document.getElementById("console").innerHTML += "PASS: " + event.type + " event had all the right key state.\n";
- else
- document.getElementById("console").innerHTML += "FAIL: " + event.type + " event did not have the right key state.\n";
-}
-
-test(false, false, false, false);
-test(true, false, false, false);
-test(false, true, false, false);
-test(false, false, true, false);
-test(false, false, false, true);
-test(true, true, true, true);
-
-link.blur();
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698