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

Unified Diff: tools/perf/measurements/startwithurl.py

Issue 113563004: Add perf tests for starting Chrome with URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test descriptions in start_with_url Created 7 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: tools/perf/measurements/startwithurl.py
diff --git a/tools/perf/measurements/startwithurl.py b/tools/perf/measurements/startwithurl.py
deleted file mode 100644
index dba732756db0e0fb2cff63ce425d14778b5b0e33..0000000000000000000000000000000000000000
--- a/tools/perf/measurements/startwithurl.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 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.
-
-from measurements import startup
-from metrics import startup_metric
-
-class StartWithUrl(startup.Startup):
- """Measures Chromium's startup performance when started with a URL
-
- This test inherits support for the --warm or --cold command line options -
- see startup.py for details.
- """
-
- def __init__(self):
- super(StartWithUrl, self).__init__()
- self.close_tabs_before_run = False
-
-
- def AddCommandLineOptions(self, parser):
- super(StartWithUrl, self).AddCommandLineOptions(parser)
- parser.add_option('--url', action='store', default=None,
- help='Start with a request to open a specific URL')
-
- def CustomizeBrowserOptions(self, options):
- super(StartWithUrl, self).CustomizeBrowserOptions(options)
- if options.url:
- browser_options = options.browser_options
- browser_options.startup_url = options.url
- options.AppendExtraBrowserArgs([
- '--restore-last-session'
- ])
-
- def CanRunForPage(self, page):
- # No matter how many pages in the pageset, just perform one test iteration.
- return page.page_set.pages.index(page) == 0
-
- def RunNavigateSteps(self, page, tab):
- # Overriden so that no page navigation occurs.
- pass
-
- def ValidatePageSet(self, page_set):
- # Reject any pageset that contains more than one WPR archive.
- wpr_archives = {}
- for page in page_set:
- wpr_archives[page_set.WprFilePathForPage(page)] = True
-
- if len(wpr_archives.keys()) > 1:
- raise Exception("Invalid pageset: more than 1 WPR archive found.: " +
- ', '.join(wpr_archives.keys()))
-
- def MeasurePage(self, page, tab, results):
- # Wait for all tabs to finish loading.
- for i in xrange(len(tab.browser.tabs)):
- t = tab.browser.tabs[i]
- t.WaitForDocumentReadyStateToBeComplete()
-
- startup_metric.StartupMetric().AddResults(tab, results)
-

Powered by Google App Engine
This is Rietveld 408576698