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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js

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-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
index 470d3d7a49d77328ae916923e13293be9f64bfc7..7dacd08aa44eca2d0f41cab7d47be2463e88c997 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
@@ -120,6 +120,14 @@ InspectorTest.makeFetch = function(url, requestInitializer, callback)
InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer]).then(callback);
}
+InspectorTest.clearNetworkCache = function(finishedCallback)
+{
+ // This turns cache off and then on, effectively clearning the cache.
+ InspectorTest.NetworkAgent.setCacheDisabled(true, function() {
allada 2016/12/16 22:47:28 Our new code does not use anonymous functions, we
Sergiy Byelozyorov 2016/12/17 15:38:53 Done.
+ InspectorTest.NetworkAgent.setCacheDisabled(false, finishedCallback);
+ });
+}
+
InspectorTest.HARPropertyFormatters = {
bodySize: "formatAsTypeName",
compression: "formatAsTypeName",

Powered by Google App Engine
This is Rietveld 408576698