summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resource-timing/resources/fake_responses.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/resource-timing/resources/fake_responses.html')
-rw-r--r--testing/web-platform/tests/resource-timing/resources/fake_responses.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/resource-timing/resources/fake_responses.html b/testing/web-platform/tests/resource-timing/resources/fake_responses.html
new file mode 100644
index 0000000000..52cad6c415
--- /dev/null
+++ b/testing/web-platform/tests/resource-timing/resources/fake_responses.html
@@ -0,0 +1,19 @@
+<body>
+<script>
+function request(type) {
+ var client = new XMLHttpRequest,
+ identifier = type == "tag" ? Math.random() : new Date().toGMTString(),
+ url = "fake_responses.py?" + type + "=" + identifier
+ client.open("GET", url, false)
+ client.send(null)
+ client.open("GET", url, false)
+ client.setRequestHeader(type == "tag" ? "If-None-Match" : "If-Modified-Since", identifier)
+ client.send(null)
+}
+
+if(window.parent.setup_iframe) {
+ window.parent.setup_iframe();
+ request("tag");
+}
+</script>
+</body>