Index: tools/telemetry/telemetry/page/actions/set_startup_url.py |
diff --git a/tools/telemetry/telemetry/page/actions/set_startup_url.py b/tools/telemetry/telemetry/page/actions/set_startup_url.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dba45d56ce59e8b4febe72a6ec3934293a9cfb08 |
--- /dev/null |
+++ b/tools/telemetry/telemetry/page/actions/set_startup_url.py |
@@ -0,0 +1,20 @@ |
+# 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 telemetry.page.actions import page_action |
+ |
+class SetStartupUrlAction(page_action.PageAction): |
+ """ Sets the URL to be loaded when the browser starts |
+ |
+ This action sets a URL to be added to the command line or Android Intent when |
+ the browser is started. It only really makes sense for tests that restart |
+ the browser for each page. |
+ """ |
+ |
+ def RunAction(self, page, tab, previous_action): |
+ pass |
+ |
+ def CustomizeBrowserOptionsForSinglePage(self, options): |
+ assert hasattr(self,'startup_url') |
+ options.browser_options.startup_url = self.startup_url |