| 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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
| 5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
| 6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
| 7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
| 8 | 8 |
| 9 | 9 |
| 10 class ToughWebglCasesPage(page_module.Page): | 10 class ToughWebglCasesPage(page_module.Page): |
| 11 | 11 |
| 12 def __init__(self, url, page_set): | 12 def __init__(self, url, page_set): |
| 13 super(ToughWebglCasesPage, self).__init__(url=url, page_set=page_set) | 13 super(ToughWebglCasesPage, self).__init__(url=url, page_set=page_set) |
| 14 self.archive_data_file = 'data/tough_webgl_cases.json' | 14 self.archive_data_file = 'data/tough_webgl_cases.json' |
| 15 | 15 |
| 16 def RunNavigateSteps(self, action_runner): | 16 def RunNavigateSteps(self, action_runner): |
| 17 action_runner.RunAction(NavigateAction()) | 17 action_runner.NavigateToPage(self) |
| 18 action_runner.RunAction(WaitAction( | 18 action_runner.RunAction(WaitAction( |
| 19 { | 19 { |
| 20 'javascript': 'document.readyState == "complete"' | 20 'javascript': 'document.readyState == "complete"' |
| 21 })) | 21 })) |
| 22 action_runner.RunAction(WaitAction({'seconds': 2})) | 22 action_runner.RunAction(WaitAction({'seconds': 2})) |
| 23 | 23 |
| 24 def RunSmoothness(self, action_runner): | 24 def RunSmoothness(self, action_runner): |
| 25 action_runner.RunAction(WaitAction({'seconds': 5})) | 25 action_runner.RunAction(WaitAction({'seconds': 5})) |
| 26 | 26 |
| 27 | 27 |
| 28 class Page1(ToughWebglCasesPage): | 28 class Page1(ToughWebglCasesPage): |
| 29 | 29 |
| 30 """ | 30 """ |
| 31 Why: Observed performance regression with this demo in M33 | 31 Why: Observed performance regression with this demo in M33 |
| 32 """ | 32 """ |
| 33 | 33 |
| 34 def __init__(self, page_set): | 34 def __init__(self, page_set): |
| 35 super(Page1, self).__init__( | 35 super(Page1, self).__init__( |
| 36 url='http://montagestudio.com/demos/eco-homes/', | 36 url='http://montagestudio.com/demos/eco-homes/', |
| 37 page_set=page_set) | 37 page_set=page_set) |
| 38 | 38 |
| 39 def RunNavigateSteps(self, action_runner): | 39 def RunNavigateSteps(self, action_runner): |
| 40 action_runner.RunAction(NavigateAction()) | 40 action_runner.NavigateToPage(self) |
| 41 action_runner.RunAction(WaitAction( | 41 action_runner.RunAction(WaitAction( |
| 42 { | 42 { |
| 43 'javascript': 'document.readyState == "complete"' | 43 'javascript': 'document.readyState == "complete"' |
| 44 })) | 44 })) |
| 45 action_runner.RunAction(WaitAction({'seconds': 15})) | 45 action_runner.RunAction(WaitAction({'seconds': 15})) |
| 46 | 46 |
| 47 | 47 |
| 48 class Page2(ToughWebglCasesPage): | 48 class Page2(ToughWebglCasesPage): |
| 49 | 49 |
| 50 def __init__(self, page_set): | 50 def __init__(self, page_set): |
| 51 super(Page2, self).__init__( | 51 super(Page2, self).__init__( |
| 52 url='http://helloracer.com/racer-s/', | 52 url='http://helloracer.com/racer-s/', |
| 53 page_set=page_set) | 53 page_set=page_set) |
| 54 | 54 |
| 55 def RunNavigateSteps(self, action_runner): | 55 def RunNavigateSteps(self, action_runner): |
| 56 action_runner.RunAction(NavigateAction()) | 56 action_runner.NavigateToPage(self) |
| 57 action_runner.RunAction(WaitAction( | 57 action_runner.RunAction(WaitAction( |
| 58 { | 58 { |
| 59 'javascript': 'document.readyState == "complete"' | 59 'javascript': 'document.readyState == "complete"' |
| 60 })) | 60 })) |
| 61 action_runner.RunAction(WaitAction({'seconds': 10})) | 61 action_runner.RunAction(WaitAction({'seconds': 10})) |
| 62 | 62 |
| 63 | 63 |
| 64 class ToughWebglCasesPageSet(page_set_module.PageSet): | 64 class ToughWebglCasesPageSet(page_set_module.PageSet): |
| 65 | 65 |
| 66 """ | 66 """ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 83 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html', | 83 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/Earth.html', |
| 84 # pylint: disable=C0301 | 84 # pylint: disable=C0301 |
| 85 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/ManyPlanetsDeep.ht
ml', | 85 'http://www.khronos.org/registry/webgl/sdk/demos/webkit/ManyPlanetsDeep.ht
ml', |
| 86 'http://webglsamples.googlecode.com/hg/aquarium/aquarium.html', | 86 'http://webglsamples.googlecode.com/hg/aquarium/aquarium.html', |
| 87 'http://webglsamples.googlecode.com/hg/blob/blob.html', | 87 'http://webglsamples.googlecode.com/hg/blob/blob.html', |
| 88 # pylint: disable=C0301 | 88 # pylint: disable=C0301 |
| 89 'http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.htm
l' | 89 'http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.htm
l' |
| 90 ] | 90 ] |
| 91 for url in urls_list: | 91 for url in urls_list: |
| 92 self.AddPage(ToughWebglCasesPage(url, self)) | 92 self.AddPage(ToughWebglCasesPage(url, self)) |
| OLD | NEW |