chromium/third_party/blink/web_tests/external/wpt/content-security-policy/support/siblingPath.js

 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);
};