summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/open-referer.htm
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/xhr/open-referer.htm')
-rw-r--r--testing/web-platform/tests/xhr/open-referer.htm20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/xhr/open-referer.htm b/testing/web-platform/tests/xhr/open-referer.htm
new file mode 100644
index 0000000000..d7ed793ebe
--- /dev/null
+++ b/testing/web-platform/tests/xhr/open-referer.htm
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+ <head>
+ <title>XMLHttpRequest: open() - value of Referer header</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method">
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ test(function() {
+ var client = new XMLHttpRequest()
+ client.open("POST", "resources/inspect-headers.py?filter_name=referer", false)
+ client.send(null)
+ assert_equals(client.responseText, "Referer: "+location.href+'\n')
+ })
+ </script>
+ </body>
+</html>