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

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

Issue 2877423004: without the plumbing!
Patch Set: Created 3 years, 7 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 interceptedRequestDict = {
17 "redirect-iframe.html": InspectorTest.allowRequest,
18 "redirect1.pl": InspectorTest.allowRequest,
19 };
20
21 var interceptedRedirectDict = {
22 "redirect2.pl": InspectorTest.allowRequest,
23 "redirect3.pl": function(event) {
24 var rawResponse =
25 "HTTP/1.1 200 OK\r\n" +
26 "Content-Type: application/javascript\r\n\r\n" +
27 "console.log('Hello from the mock resource');";
28 InspectorTest.mockResponse(event, rawResponse);
29 }
30 };
31
32 InspectorTest.startInterceptionTest(interceptedRequestDict,
33 interceptedRedirectDict, 1);
34 }
35 </script>
36 </head>
37 <body onload="runTest();">
38 <p>Tests interception of redirects.</a>
39 </p>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698