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

Unified Diff: tools/perf/perf_tools/small_profile.py

Issue 14359012: Telemetry: Add option to create a dirty profile as part of a test run (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace fixes Created 7 years, 8 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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | tools/telemetry/telemetry/core/browser.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/perf_tools/small_profile.py
diff --git a/tools/perf/perf_tools/small_profile.py b/tools/perf/perf_tools/small_profile.py
new file mode 100644
index 0000000000000000000000000000000000000000..fd0b6b30a5ce85696b36ea96ceacdfe4b36a213d
--- /dev/null
+++ b/tools/perf/perf_tools/small_profile.py
@@ -0,0 +1,23 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
nduca 2013/04/26 20:09:36 why is this one here and not with the dirty one?
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+from telemetry.page import page_set
+
+# Runs a browser through a series of operations to fill in a small test profile.
+class SmallProfile(object):
+ def __init__(self, browser):
+ super(SmallProfile, self).__init__()
+ self._browser = browser
+
+ def CreateProfile(self):
+ top_25 = os.path.join(os.path.dirname(__file__),
+ '..', 'page_sets', 'top_25.json')
+ pages_to_load = page_set.PageSet.FromFile(top_25)
+ tab = self._browser.tabs[0]
+ for page in pages_to_load:
+ tab.Navigate(page.url)
+ tab.WaitForDocumentReadyStateToBeComplete()
+ tab.Disconnect()
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | tools/telemetry/telemetry/core/browser.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698