4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 <link rel="help" "https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html#imported-document" />
8 <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">
12 function assert_loaded(id)
14 var target = document.getElementById(id);
15 assert_true(target.import instanceof Document)
16 assert_true(0 <= target.import.querySelector("h1").innerHTML.indexOf("Hello"));
19 function assert_not_loaded(id)
21 var target = document.getElementById(id);
22 assert_equals(target.import, null);
25 // The final resource is accessed with a 'null' origin as the 2nd redirect changes origin.
26 test(function() { assert_not_loaded("same-cors-same"); }, "Accessing to a same origin import including intermediate CORS domain redirect");