Index: tools/perf/page_sets/session_restore.py |
diff --git a/tools/perf/page_sets/session_restore.py b/tools/perf/page_sets/session_restore.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f7af0afbcb28a9bb5167981036fdbd769f16e455 |
--- /dev/null |
+++ b/tools/perf/page_sets/session_restore.py |
@@ -0,0 +1,32 @@ |
+# Copyright 2015 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 page_sets import typical_25 |
+from telemetry.page import page as page_module |
+from telemetry.page import page_set as page_set_module |
+ |
+ |
+class SessionRestorePageSet(page_set_module.PageSet): |
+ """A special case of the typical_25 for the session_restore benchmarks. |
+ |
+ The session_restore benchmarks -- before running the test -- use the |
+ typical_25 page set to build a profile that has multiple tabs open. |
+ Then, they use the session restore behavior to restore that state while |
+ starting with a dummy URL. |
+ |
+ This class is only to be used by the session_restore benchmark. This |
+ class is here because archive_data_file -- shared from typical_25 -- |
+ is relative to this directory. |
+ """ |
+ |
+ def __init__(self): |
+ super(SessionRestorePageSet, self).__init__( |
+ user_agent_type=typical_25.USER_AGENT_TYPE, |
+ archive_data_file=typical_25.ARCHIVE_DATA_FILE, |
+ bucket=typical_25.PAGE_SET_BUCKET) |
+ |
+ # The session_restore measurement never navigates to this url. |
+ # However, the url is needed to make sure Web Page Replay starts. |
+ # The url listed here needs exist in the WPR archive. |
+ self.AddUserStory(page_module.Page( |
+ 'http://www.nick.com/games', self)) |