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

Unified Diff: LayoutTests/fast/dom/promise-rejection-events-isolated-worlds.html

Issue 1218733003: Restrict PromiseRejectionEvents to their originating world (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8AbstractEventListener.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/promise-rejection-events-isolated-worlds.html
diff --git a/LayoutTests/fast/dom/promise-rejection-events-isolated-worlds.html b/LayoutTests/fast/dom/promise-rejection-events-isolated-worlds.html
new file mode 100644
index 0000000000000000000000000000000000000000..9bd818891a91e5283fac8ab57e0e3abdb112f217
--- /dev/null
+++ b/LayoutTests/fast/dom/promise-rejection-events-isolated-worlds.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+'use strict';
+async_test(function(t) {
+ if (window.testRunner) {
+ testRunner.evaluateScriptInIsolatedWorld(1, "var p = Promise.reject(new Error());");
+ }
+ window.onunhandledrejection = t.unreached_func('no events should fire');
+ window.onrejectionhandled = t.unreached_func('no events should fire');
+ setTimeout(function() { t.done(); }, 10);
+}, 'promise rejection events should not be fired for content scripts');
+</script>
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8AbstractEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698