Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2e2f3142c37b8f38aa2a9097075b9b3a804e8b01 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-interception.html |
@@ -0,0 +1,37 @@ |
+<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/redirect-iframe.html"; |
+ document.body.appendChild(iframe); |
+} |
+ |
+function test() |
+{ |
+ var requestInterceptedDict = { |
+ "redirect-iframe.html": function(event) { |
+ var rawResponse = |
+ "HTTP/1.1 200 OK\r\n" + |
+ "Content-Type: text/html; charset=UTF-8\r\n\r\n" + |
+ "<html><head><script>" + |
+ "console.log('Hello from the mocked iframe.')" + |
+ "</" + "script></head></html>"; |
+ testRunner.logToStderr('rawResponse ' + rawResponse); |
+ InspectorTest.mockResponse(event, rawResponse); |
+ }, |
+ }; |
+ |
+ InspectorTest.startInterceptionTest(requestInterceptedDict, 1); |
+} |
+</script> |
+</head> |
+<body onload="runTest();"> |
+<p>Tests a mocking of a navigation fetch.</a> |
+</p> |
+</body> |
+</html> |