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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-filters.html

Issue 2570553002: Clear cache before running the test (Closed)
Patch Set: Fix Created 4 years 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/network-filters.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-filters.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-filters.html
index 2dba1356fa5aadc96ec87c954e586e50d936b270..0021f2d025315304fd4dcf1228e5e9bc0e8322e9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-filters.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-filters.html
@@ -5,16 +5,6 @@
<script>
function test()
{
- InspectorTest.recordNetwork();
-
- var totalResourceCount = 4;
- InspectorTest.makeFetch("resources/style.css", {}, ensureAllResources);
- InspectorTest.makeFetch("resources/abe.png", {}, () => {
- // Ensures result is cached.
- InspectorTest.makeFetch("resources/abe.png", {}, ensureAllResources);
- ensureAllResources();
- });
- InspectorTest.makeFetch("missing/foo.bar", {}, ensureAllResources);
var filterChecks = [{
filterText: "-.css",
isRegex: false
@@ -57,6 +47,7 @@ function test()
}];
var resourceCount = 0;
+ var totalResourceCount = 4;
function ensureAllResources()
{
if (++resourceCount >= totalResourceCount)
@@ -94,6 +85,20 @@ function test()
UI.panels.network._networkLogView._textFilterUI.setValue(value);
UI.panels.network._networkLogView._filterChanged(null); // event not used in this method, so passing null
}
+
+ function fetchResources() {
allada 2016/12/16 22:47:28 nit: This is very nitty, but could we move this ab
Sergiy Byelozyorov 2016/12/17 15:38:53 Done.
+ InspectorTest.recordNetwork();
+
+ InspectorTest.makeFetch("resources/style.css", {}, ensureAllResources);
+ InspectorTest.makeFetch("resources/abe.png", {}, () => {
+ // Ensures result is cached.
+ InspectorTest.makeFetch("resources/abe.png", {}, ensureAllResources);
+ ensureAllResources();
+ });
+ InspectorTest.makeFetch("missing/foo.bar", {}, ensureAllResources);
+ }
+
+ InspectorTest.clearNetworkCache(fetchResources);
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698