diff options
Diffstat (limited to 'testing/web-platform/tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js')
-rw-r--r-- | testing/web-platform/tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/testing/web-platform/tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js b/testing/web-platform/tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js deleted file mode 100644 index 5e2ef2a8c..000000000 --- a/testing/web-platform/tests/XMLHttpRequest/resources/workerxhr-origin-referrer.js +++ /dev/null @@ -1,34 +0,0 @@ -// This simply posts a message to the owner page with the contents of the Referer header -var xhr=new XMLHttpRequest() -xhr.onreadystatechange = function(){ - if(xhr.readyState == 4){ - var obj = {test:'Referer header', result:xhr.responseText} - self.postMessage(obj) - } -} -xhr.open('GET', 'inspect-headers.py?filter_name=referer', true) -xhr.send() - -// This simply posts a message to the owner page with the contents of the Origin header -var xhr2=new XMLHttpRequest() -xhr2.onreadystatechange = function(){ - if(xhr2.readyState == 4){ - var obj = {test:'Origin header', result:xhr2.responseText} - self.postMessage(obj) - } -} -xhr2.open('GET', location.protocol + '//www2.'+location.hostname+((location.port === "")?"":":"+location.port)+(location.pathname.replace(/[^/]*$/, ''))+'inspect-headers.py?filter_name=origin&cors', true) -xhr2.send() - -// If "origin" / base URL is the origin of this JS file, we can load files -// from the server it originates from.. and requri.py will be able to tell us -// what the requested URL was -var xhr3=new XMLHttpRequest() -xhr3.onreadystatechange = function(){ - if(xhr3.readyState == 4){ - var obj = {test:'Request URL test', result:xhr3.responseText} - self.postMessage(obj) - } -} -xhr3.open('GET', 'requri.py?full', true) -xhr3.send() |