Sync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / XMLHttpRequest / open-referer.htm
1 <!doctype html>
2 <html>
3   <head>
4     <title>XMLHttpRequest: open() - value of Referer header</title>
5     <script src="/resources/testharness.js"></script>
6     <script src="/resources/testharnessreport.js"></script>
7     <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method">
8   </head>
9   <body>
10     <div id="log"></div>
11     <script>
12       test(function() {
13         var client = new XMLHttpRequest()
14         client.open("POST", "resources/inspect-headers.py?filter_name=referer", false)
15         client.send(null)
16         assert_equals(client.responseText, "Referer: "+location.href+'\n')
17       })
18     </script>
19   </body>
20 </html>