Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/support/siblingPath.js |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/support/siblingPath.js b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/support/siblingPath.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f4012f04ddaf24bd0a2e888fe8ddbd502d1d1de3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/support/siblingPath.js |
@@ -0,0 +1,5 @@ |
+ buildSiblingPath = function(hostPrefix, relativePath, newPort) { |
+ var port = newPort ? newPort : document.location.port; |
+ var path = document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1); |
+ return (document.location.protocol + '//' + hostPrefix + "." + document.location.hostname + ':' + port + path + relativePath); |
+}; |