Skip to content

Commit

Permalink
Merge pull request #2252 from metromoxie/sri-make-crossorigin-tests-c…
Browse files Browse the repository at this point in the history
…ross-platform

Make SRI crossorigin tests cross platform
  • Loading branch information
hillbrad committed Oct 13, 2015
2 parents b17a2e2 + 6b74f25 commit d212fd5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{location[port]}}
Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}
Access-Control-Allow-Credentials: true
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{location[port]}}
Access-Control-Allow-Origin: {{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}
Access-Control-Allow-Credentials: true
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Subresource Integrity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>

<div id="log"></div>

<div id="container"></div>
<script>
// <script> tests
var xorigin_anon_script = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-anon-script.js';

var xorigin_creds_script = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-creds-script.js';

var xorigin_ineligible_script = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-ineligible-script.js';

var SRIScriptTest = function(pass, name, src, integrityValue, crossoriginValue) {
Expand Down Expand Up @@ -52,15 +52,15 @@
};

var xorigin_anon_style = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-anon-style.css';

var xorigin_creds_style = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-creds-style.css';

var xorigin_ineligible_style = location.protocol
+ '//www1.' + location.hostname + ':' + location.port
+ '//' + location.hostname + ':' + {{ports[http][1]}}
+ '/subresource-integrity/crossorigin-ineligible-style.css';

// <link> tests
Expand Down Expand Up @@ -540,6 +540,6 @@
style_tests.execute();

</script>
<!--TODO check cache-poisoned resources, transfer-encoding, 3xx redirect
<!-- TODO check cache-poisoned resources, transfer-encoding, 3xx redirect
to resource with matching hash, and cross-origin leakage test as in sec5.3.
-->
-->

0 comments on commit d212fd5

Please sign in to comment.