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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests.html

Issue 1578993002: Fix double resource request for script resources with integrity attr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2564
Patch Set: Created 4 years, 11 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../inspector-test.js"></script>
5 <script src="../network-test.js"></script>
6 <script>
7 // Regression test for https://crbug.com/573269.
8 function loadIFrame() {
9 var iframe = document.createElement('iframe');
10 iframe.src = 'resources/call-success-with-integrity-frame.html';
11 document.body.appendChild(iframe);
12 }
13
14 function test() {
15 function findRequestsByURL(url)
16 {
17 var requests = InspectorTest.networkRequests();
18 var results = [];
19 for (var i = 0; i < requests.length; ++i) {
20 if (url.test(requests[i].url))
21 results.push(requests[i]);
22 }
23
24 return results;
25 }
26 InspectorTest.addConsoleSniffer(step1);
27 InspectorTest.evaluateInPage("loadIFrame()");
28
29 function step1() {
30 var requests = findRequestsByURL(/call-success.js/);
31 InspectorTest.assertTrue(requests.length === 1);
32 InspectorTest.completeTest();
33 }
34 }
35 </script>
36 </head>
37 <body>
38 <script>runTest();</script>
39 <p>Verify that only one request is made for basic script requests with integrity attribute.</p>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698