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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/events-in-isolated-world.html

Issue 1939713003: Dispatch events in isolated worlds, even if script execution is forbidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 8 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/events-in-isolated-world.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/events-in-isolated-world.html b/third_party/WebKit/LayoutTests/fast/events/events-in-isolated-world.html
new file mode 100644
index 0000000000000000000000000000000000000000..6325f368788562f14ada6c290b9642b3975895c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/events-in-isolated-world.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<button id="button"></button>
+<script>
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.setScriptsAllowed(false);
+
+ document.getElementById('button').addEventListener('keydown', function() { console.log('keydown event in main world') });
+ testRunner.evaluateScriptInIsolatedWorld(1, "document.getElementById('button').addEventListener('keydown', function() { console.log('keydown event in isolated world') });");
+
+ document.getElementById("button").focus();
+ eventSender.keyDown('e', []);
+} else {
+ console.log("This test reuqires testRunner.setScriptsAllowed, so it can't run in a browser.");
+}
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698