| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
| 6 | 6 |
| 7 | 7 |
| 8 class KeySilkCasesPage(page_module.Page): | 8 class KeySilkCasesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 url='file://key_silk_cases/inbox_app.html?slide_drawer', | 356 url='file://key_silk_cases/inbox_app.html?slide_drawer', |
| 357 page_set=page_set) | 357 page_set=page_set) |
| 358 | 358 |
| 359 def ToggleDrawer(self, action_runner): | 359 def ToggleDrawer(self, action_runner): |
| 360 interaction = action_runner.BeginGestureInteraction( | 360 interaction = action_runner.BeginGestureInteraction( |
| 361 'TapAction', is_smooth=True) | 361 'TapAction', is_smooth=True) |
| 362 action_runner.TapElement('#menu-button') | 362 action_runner.TapElement('#menu-button') |
| 363 interaction.End() | 363 interaction.End() |
| 364 | 364 |
| 365 interaction = action_runner.BeginInteraction('Wait', is_smooth=True) | 365 interaction = action_runner.BeginInteraction('Wait', is_smooth=True) |
| 366 action_runner.WaitForJavaScriptCondition( | 366 action_runner.WaitForJavaScriptCondition(''' |
| 367 'document.getElementById("nav-drawer").active') | 367 document.getElementById("nav-drawer").active && |
| 368 document.getElementById("nav-drawer").children[0] |
| 369 .getBoundingClientRect().left == 0''') |
| 368 interaction.End() | 370 interaction.End() |
| 369 | 371 |
| 370 def RunNavigateSteps(self, action_runner): | 372 def RunNavigateSteps(self, action_runner): |
| 371 action_runner.NavigateToPage(self) | 373 action_runner.NavigateToPage(self) |
| 372 action_runner.Wait(2) | 374 action_runner.Wait(2) |
| 373 self.ToggleDrawer(action_runner) | 375 self.ToggleDrawer(action_runner) |
| 374 | 376 |
| 375 def RunSmoothness(self, action_runner): | 377 def RunSmoothness(self, action_runner): |
| 376 self.SlideDrawer(action_runner) | 378 self.SlideDrawer(action_runner) |
| 377 | 379 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 self.AddPage(Page19(self)) | 648 self.AddPage(Page19(self)) |
| 647 self.AddPage(Page20(self)) | 649 self.AddPage(Page20(self)) |
| 648 self.AddPage(Page21(self)) | 650 self.AddPage(Page21(self)) |
| 649 self.AddPage(Page22(self)) | 651 self.AddPage(Page22(self)) |
| 650 self.AddPage(Page23(self)) | 652 self.AddPage(Page23(self)) |
| 651 self.AddPage(Page24(self)) | 653 self.AddPage(Page24(self)) |
| 652 self.AddPage(Page25(self)) | 654 self.AddPage(Page25(self)) |
| 653 self.AddPage(Page26(self)) | 655 self.AddPage(Page26(self)) |
| 654 self.AddPage(SVGIconRaster(self)) | 656 self.AddPage(SVGIconRaster(self)) |
| 655 self.AddPage(UpdateHistoryState(self)) | 657 self.AddPage(UpdateHistoryState(self)) |
| OLD | NEW |