| Index: LayoutTests/http/tests/htmlimports/redirect-cross-origin-cross-same-2.html
|
| diff --git a/LayoutTests/http/tests/htmlimports/redirect-cross-origin-cross-same-2.html b/LayoutTests/http/tests/htmlimports/redirect-cross-origin-cross-same-2.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..258beef2d0009609a9bc67b4bef278a2fa3b8701
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/htmlimports/redirect-cross-origin-cross-same-2.html
|
| @@ -0,0 +1,29 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<link rel="help" "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html#imported-document" />
|
| +
|
| +<link id="same-cors-same" rel="import" href="/security/resources/redir.php?url=http%3A%2F%2Flocalhost%3A8000%2Fsecurity%2Fresources%2Fcors-redir.php%3Furl%3Dhttp%3A%2F%2F127.0.0.1%3A8000%2Fhtmlimports%2Fresources%2Fhello.html">
|
| +</head>
|
| +<body>
|
| +<script>
|
| +function assert_loaded(id)
|
| +{
|
| + var target = document.getElementById(id);
|
| + assert_true(target.import instanceof Document)
|
| + assert_true(0 <= target.import.querySelector("h1").innerHTML.indexOf("Hello"));
|
| +}
|
| +
|
| +function assert_not_loaded(id)
|
| +{
|
| + var target = document.getElementById(id);
|
| + assert_equals(target.import, null);
|
| +}
|
| +
|
| +// The final resource is accessed with a 'null' origin as the 2nd redirect changes origin.
|
| +test(function() { assert_not_loaded("same-cors-same"); }, "Accessing to a same origin import including intermediate CORS domain redirect");
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|