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

Unified Diff: LayoutTests/http/tests/navigation/beacon-cross-origin-redirect.html

Issue 1016373002: Perform CORS access checks on Beacon redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased + add mixed content test Created 5 years, 9 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 | LayoutTests/http/tests/navigation/beacon-cross-origin-redirect-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/navigation/beacon-cross-origin-redirect.html
diff --git a/LayoutTests/http/tests/navigation/beacon-cross-origin-redirect.html b/LayoutTests/http/tests/navigation/beacon-cross-origin-redirect.html
new file mode 100644
index 0000000000000000000000000000000000000000..26936a8f2431f8de7729bf9ce7bfca1c00859a40
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/beacon-cross-origin-redirect.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="/js-test-resources/js-test.js"></script>
+<script>
+description("Verifying that navigator.sendBeacon() to non-CORS cross-origin redirect fails.");
+
+window.jsTestIsAsync = true;
+
+function test() {
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpPingLoaderCallbacks();
+ }
+
+ shouldBeTrue('navigator.sendBeacon("http://127.0.0.1:8080/navigation/resources/redirection-response.php?status=302&target=non-existent.php", "CrossOrigin");');
+ // Wait a while for the redirect response handling to happen before finishing up.
+ setTimeout(finishJSTest, 200);
+}
+</script>
+</head>
+<body onload="test();">
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/navigation/beacon-cross-origin-redirect-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698