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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow.html

Issue 1474983004: Mute non-CORS cross origin promise rejection events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 1 month 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 | third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow.html b/third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow.html
new file mode 100644
index 0000000000000000000000000000000000000000..ac68a5058bd3f0ae2a968243067120ab6149f00c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<p>Tests that promise rejection events are received for cross origin CORS scripts</p>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+addEventListener('unhandledrejection', function(e) {
+ console.log('PASS: received unhandledrejection event');
+ if (e.reason == 42)
+ console.log('PASS: received expected reason');
+ else
+ console.log('FAIL: received unexpected reason: ' + e.reason);
+ if (window.testRunner)
+ testRunner.notifyDone();
+});
+</script>
+<script src='http://localhost:8000/security/resources/promise-access-control.php?allow=true' crossorigin='anonymous'></script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/promise-access-control-allow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698