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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests-for-script.html

Issue 1569623002: Fix-up some code relating to SRI double-requesting scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: More fixes 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests-for-script.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests-for-script.html
similarity index 67%
copy from third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests.html
copy to third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests-for-script.html
index 4e2ecbfa972070f27f21aec7c95f76a613cd44ff..1ffcd1d4387967b0bb8b99aaf82adf6c671c2e8d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/subresource-integrity-number-of-requests-for-script.html
@@ -12,22 +12,11 @@ function loadIFrame() {
}
function test() {
- function findRequestsByURL(url)
- {
- var requests = InspectorTest.networkRequests();
- var results = [];
- for (var i = 0; i < requests.length; ++i) {
- if (url.test(requests[i].url))
- results.push(requests[i]);
- }
-
- return results;
- }
InspectorTest.addConsoleSniffer(step1);
InspectorTest.evaluateInPage("loadIFrame()");
function step1() {
- var requests = findRequestsByURL(/call-success.js/);
+ var requests = InspectorTest.findRequestsByURLPattern(/call-success.js/);
InspectorTest.assertTrue(requests.length === 1);
InspectorTest.completeTest();
}

Powered by Google App Engine
This is Rietveld 408576698