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

Unified Diff: tools/telemetry/telemetry/core/chrome/inspector_network.py

Issue 16154007: [Telemetry] Add a page set option to use all cold page loads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use devtool's cache clearing Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/chrome/inspector_network.py
diff --git a/tools/telemetry/telemetry/core/chrome/inspector_network.py b/tools/telemetry/telemetry/core/chrome/inspector_network.py
new file mode 100644
index 0000000000000000000000000000000000000000..e533a90f991495805a4d9803fe354784c4bd1c2c
--- /dev/null
+++ b/tools/telemetry/telemetry/core/chrome/inspector_network.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+class InspectorNetwork(object):
+ def __init__(self, inspector_backend):
+ self._inspector_backend = inspector_backend
+
+ def ClearCache(self, timeout=60):
+ """Clears the browser's disk and memory cache."""
+ res = self._inspector_backend.SyncRequest({
+ 'method': 'Network.canClearBrowserCache'
+ }, timeout)
+ assert res['result'], 'Cache clearing is not supported by this browser'
+ self._inspector_backend.SyncRequest({
+ 'method': 'Network.clearBrowserCache'
+ }, timeout)

Powered by Google App Engine
This is Rietveld 408576698