Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1893f6a0377434e66e9312157924638abb871ff9 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/xhr-interception.html |
@@ -0,0 +1,35 @@ |
+<html> |
+<head> |
+<script type="text/javascript" src="../inspector-protocol-test.js"></script> |
+<script type="text/javascript" src="interception-test.js"></script> |
+ |
+<script> |
+function appendIframe() |
+{ |
+ var iframe = document.createElement("iframe"); |
+ iframe.src = "resources/xhr-iframe.html"; |
+ document.body.appendChild(iframe); |
+} |
+ |
+function test() |
+{ |
+ var requestInterceptedDict = { |
+ "xhr-iframe.html": InspectorTest.allowRequest, |
+ "example.txt": function(event) { |
+ var rawResponse = |
+ "HTTP/1.1 200 OK\r\n" + |
+ "Content-Type: text/plain\r\n\r\n" + |
+ "Payload for the Mock XHR response;"; |
+ InspectorTest.mockResponse(event, rawResponse); |
+ }, |
+ }; |
+ |
+ InspectorTest.startInterceptionTest(requestInterceptedDict, 1); |
+} |
+</script> |
+</head> |
+<body onload="runTest();"> |
+<p>Tests interception of an XHR request.</a> |
+</p> |
+</body> |
+</html> |