OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 | 6 |
7 from telemetry.page import page as page_module | 7 from telemetry.page import page as page_module |
8 from telemetry.page import shared_page_state | 8 from telemetry.page import shared_page_state |
9 from telemetry import story | 9 from telemetry import story |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 def __init__(self, page_set): | 74 def __init__(self, page_set): |
75 super(GmailPage, self).__init__( | 75 super(GmailPage, self).__init__( |
76 'https://mail.google.com/mail/', | 76 'https://mail.google.com/mail/', |
77 page_set=page_set, | 77 page_set=page_set, |
78 name='Gmail') | 78 name='Gmail') |
79 | 79 |
80 def RunNavigateSteps(self, action_runner): | 80 def RunNavigateSteps(self, action_runner): |
81 google_login.LoginGoogleAccount(action_runner, 'google', | 81 google_login.LoginGoogleAccount(action_runner, 'google', |
82 self.credentials_path) | 82 self.credentials_path) |
83 super(GmailPage, self).RunNavigateSteps(action_runner) | 83 super(GmailPage, self).RunNavigateSteps(action_runner) |
84 # Needs to wait for navigation to handle redirects. | |
85 action_runner.WaitForNavigate() | |
86 action_runner.WaitForElement(selector='#apploadingdiv') | 84 action_runner.WaitForElement(selector='#apploadingdiv') |
87 action_runner.WaitForJavaScriptCondition( | 85 action_runner.WaitForJavaScriptCondition( |
88 'document.querySelector("#apploadingdiv").style.opacity == "0"') | 86 'document.querySelector("#apploadingdiv").style.opacity == "0"') |
89 | 87 |
90 | 88 |
91 class BlinkMemoryMobilePageSet(story.StorySet): | 89 class BlinkMemoryMobilePageSet(story.StorySet): |
92 """Key mobile sites for Blink memory reduction.""" | 90 """Key mobile sites for Blink memory reduction.""" |
93 | 91 |
94 def __init__(self): | 92 def __init__(self): |
95 super(BlinkMemoryMobilePageSet, self).__init__( | 93 super(BlinkMemoryMobilePageSet, self).__init__( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 # Why: Key products. | 125 # Why: Key products. |
128 self.AddStory(GmailPage(page_set=self)) | 126 self.AddStory(GmailPage(page_set=self)) |
129 self.AddStory(BlinkMemoryMobilePage( | 127 self.AddStory(BlinkMemoryMobilePage( |
130 'http://googlewebmastercentral.blogspot.com/2015/04/rolling-out-mobile-f
riendly-update.html?m=1', | 128 'http://googlewebmastercentral.blogspot.com/2015/04/rolling-out-mobile-f
riendly-update.html?m=1', |
131 page_set=self, | 129 page_set=self, |
132 name='Blogger')) | 130 name='Blogger')) |
133 self.AddStory(BlinkMemoryMobilePage( | 131 self.AddStory(BlinkMemoryMobilePage( |
134 'https://plus.google.com/app/basic/110031535020051778989/posts?source=ap
ppromo', | 132 'https://plus.google.com/app/basic/110031535020051778989/posts?source=ap
ppromo', |
135 page_set=self, | 133 page_set=self, |
136 name='GooglePlus')) | 134 name='GooglePlus')) |
OLD | NEW |