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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/disable-interception-midway.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/resource-iframe.html";
11 document.body.appendChild(iframe);
12 }
13
14 function test()
15 {
16 var numRequests = 0;
17 var maybeDisableRequestInterception = function(event) {
18 numRequests++;
19 // To make this test non-flaky wait until the first three requests have
20 // been made before disabling. We can't wait for all for because the
21 // scripts are blocking.
22 if (numRequests === 3)
23 InspectorTest.disableRequestInterception(event);
24 };
25
26 var requestInterceptedDict = {
27 "resource-iframe.html": InspectorTest.allowRequest,
28 "i-dont-exist.css": maybeDisableRequestInterception,
29 "script.js": maybeDisableRequestInterception,
30 "script2.js": maybeDisableRequestInterception,
31 "post-echo.pl": maybeDisableRequestInterception,
32 };
33
34 InspectorTest.startInterceptionTest(requestInterceptedDict, 1);
35 }
36 </script>
37 </head>
38 <body onload="runTest();">
39 <p>Tests interception blocking, modification of network fetches.</a>
40 </p>
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698