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> |