Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-mock302.html

Issue 2739323003: DevTools protocol interception, blocking & modification of requests (Closed)
Patch Set: Add a comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../inspector-protocol-test.js"></script>
4 <script type="text/javascript" src="interception-test.js"></script>
5
6 <script>
7 function appendIframe()
8 {
9 var iframe = document.createElement("iframe");
10 iframe.src = "resources/redirect-iframe.html";
11 document.body.appendChild(iframe);
12 }
13
14 function test()
15 {
16 var requestInterceptedDict = {
17 "redirect-iframe.html": InspectorTest.allowRequest,
18 "redirect1.pl": function(event) {
19 var rawResponse =
20 "HTTP/1.1 302 Found\r\n" +
21 "Location: final.js\r\n\r\n";
22 InspectorTest.mockResponse(event, rawResponse);
23 },
24 "final.js": InspectorTest.allowRequest,
25 };
26
27 InspectorTest.startInterceptionTest(requestInterceptedDict, 1);
28 }
29 </script>
30 </head>
31 <body onload="runTest();">
32 <p>Tests a mock 302 resource.</a>
33 </p>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698