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

Unified Diff: LayoutTests/http/tests/navigation/beacon-cross-origin.https.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
Index: LayoutTests/http/tests/navigation/beacon-cross-origin.https.html
diff --git a/LayoutTests/http/tests/navigation/beacon-cross-origin.https.html b/LayoutTests/http/tests/navigation/beacon-cross-origin.https.html
new file mode 100644
index 0000000000000000000000000000000000000000..4902e09f03ad3075edc27b2c11eac40235206e78
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/beacon-cross-origin.https.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="/js-test-resources/js-test.js"></script>
+<script>
+description("Verify navigator.sendBeacon() mixed content checking.");
+
+window.jsTestIsAsync = true;
+
+function test() {
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ shouldBeFalse('navigator.sendBeacon("http://localhost:8000/navigation/resources/save-beacon.php?name=cross-origin", "CrossOrigin");');
+ finishJSTest();
+}
+</script>
+</head>
+<body onload="test();">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698