| 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 import story | 5 from telemetry import story |
| 6 | 6 |
| 7 | 7 |
| 8 class ToughCanvasCasesPage(page_module.Page): | 8 class ToughCanvasCasesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
| 11 super(ToughCanvasCasesPage, self).__init__(url=url, page_set=page_set) | 11 super(ToughCanvasCasesPage, self).__init__(url=url, page_set=page_set) |
| 12 self.archive_data_file = 'data/tough_canvas_cases.json' | 12 self.archive_data_file = 'data/tough_canvas_cases.json' |
| 13 | 13 |
| 14 def RunNavigateSteps(self, action_runner): | 14 def RunNavigateSteps(self, action_runner): |
| 15 super(ToughCanvasCasesPage, self).RunNavigateSteps(action_runner) | 15 super(ToughCanvasCasesPage, self).RunNavigateSteps(action_runner) |
| 16 action_runner.WaitForJavaScriptCondition( | 16 action_runner.WaitForJavaScriptCondition( |
| 17 "document.readyState == 'complete'") | 17 "document.readyState == 'complete'") |
| 18 | 18 |
| 19 def RunPageInteractions(self, action_runner): | 19 def RunPageInteractions(self, action_runner): |
| 20 with action_runner.CreateInteraction('CanvasAnimation'): | 20 with action_runner.CreateInteraction('CanvasAnimation'): |
| 21 action_runner.Wait(5) | 21 action_runner.Wait(5) |
| 22 | 22 |
| 23 | 23 |
| 24 class MicrosofFirefliesPage(ToughCanvasCasesPage): | 24 class MicrosofFirefliesPage(ToughCanvasCasesPage): |
| 25 | 25 |
| 26 def __init__(self, page_set): | 26 def __init__(self, page_set): |
| 27 super(MicrosofFirefliesPage, self).__init__( | 27 super(MicrosofFirefliesPage, self).__init__( |
| 28 # pylint: disable=C0301 | 28 # pylint: disable=line-too-long |
| 29 url='http://ie.microsoft.com/testdrive/Performance/Fireflies/Default.html'
, | 29 url='http://ie.microsoft.com/testdrive/Performance/Fireflies/Default.html'
, |
| 30 page_set=page_set) | 30 page_set=page_set) |
| 31 | 31 |
| 32 | 32 |
| 33 class ToughCanvasCasesPageSet(story.StorySet): | 33 class ToughCanvasCasesPageSet(story.StorySet): |
| 34 | 34 |
| 35 """ | 35 """ |
| 36 Description: Self-driven Canvas2D animation examples | 36 Description: Self-driven Canvas2D animation examples |
| 37 """ | 37 """ |
| 38 | 38 |
| 39 def __init__(self): | 39 def __init__(self): |
| 40 super(ToughCanvasCasesPageSet, self).__init__( | 40 super(ToughCanvasCasesPageSet, self).__init__( |
| 41 archive_data_file='data/tough_canvas_cases.json', | 41 archive_data_file='data/tough_canvas_cases.json', |
| 42 cloud_storage_bucket=story.PARTNER_BUCKET) | 42 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 43 | 43 |
| 44 # Crashes on Galaxy Nexus. crbug.com/314131 | 44 # Crashes on Galaxy Nexus. crbug.com/314131 |
| 45 # self.AddStory(MicrosofFirefliesPage(self)) | 45 # self.AddStory(MicrosofFirefliesPage(self)) |
| 46 | 46 |
| 47 # Failing on Nexus 5 (http://crbug.com/364248): | 47 # Failing on Nexus 5 (http://crbug.com/364248): |
| 48 # 'http://geoapis.appspot.com/agdnZW9hcGlzchMLEgtFeGFtcGxlQ29kZRjh1wIM', | 48 # 'http://geoapis.appspot.com/agdnZW9hcGlzchMLEgtFeGFtcGxlQ29kZRjh1wIM', |
| 49 | 49 |
| 50 urls_list = [ | 50 urls_list = [ |
| 51 'http://mudcu.be/labs/JS1k/BreathingGalaxies.html', | 51 'http://mudcu.be/labs/JS1k/BreathingGalaxies.html', |
| 52 'http://runway.countlessprojects.com/prototype/performance_test.html', | 52 'http://runway.countlessprojects.com/prototype/performance_test.html', |
| 53 # pylint: disable=C0301 | 53 # pylint: disable=line-too-long |
| 54 'http://ie.microsoft.com/testdrive/Performance/FishIETank/Default.html', | 54 'http://ie.microsoft.com/testdrive/Performance/FishIETank/Default.html', |
| 55 'http://ie.microsoft.com/testdrive/Performance/SpeedReading/Default.html', | 55 'http://ie.microsoft.com/testdrive/Performance/SpeedReading/Default.html', |
| 56 'http://acko.net/dumpx/996b.html', | 56 'http://acko.net/dumpx/996b.html', |
| 57 'http://www.kevs3d.co.uk/dev/canvask3d/k3d_test.html', | 57 'http://www.kevs3d.co.uk/dev/canvask3d/k3d_test.html', |
| 58 'http://www.megidish.net/awjs/', | 58 'http://www.megidish.net/awjs/', |
| 59 'http://themaninblue.com/experiment/AnimationBenchmark/canvas/', | 59 'http://themaninblue.com/experiment/AnimationBenchmark/canvas/', |
| 60 'http://mix10k.visitmix.com/Entry/Details/169', | 60 'http://mix10k.visitmix.com/Entry/Details/169', |
| 61 'http://www.craftymind.com/factory/guimark2/HTML5ChartingTest.html', | 61 'http://www.craftymind.com/factory/guimark2/HTML5ChartingTest.html', |
| 62 'http://www.chiptune.com/starfield/starfield.html', | 62 'http://www.chiptune.com/starfield/starfield.html', |
| 63 'http://jarrodoverson.com/static/demos/particleSystem/', | 63 'http://jarrodoverson.com/static/demos/particleSystem/', |
| 64 'http://www.effectgames.com/demos/canvascycle/', | 64 'http://www.effectgames.com/demos/canvascycle/', |
| 65 'http://www.thewildernessdowntown.com/', | 65 'http://www.thewildernessdowntown.com/', |
| 66 'http://spielzeugz.de/html5/liquid-particles.html', | 66 'http://spielzeugz.de/html5/liquid-particles.html', |
| 67 'http://hakim.se/experiments/html5/magnetic/02/', | 67 'http://hakim.se/experiments/html5/magnetic/02/', |
| 68 'http://ie.microsoft.com/testdrive/Performance/LetItSnow/', | 68 'http://ie.microsoft.com/testdrive/Performance/LetItSnow/', |
| 69 # crbug.com/501406 causes OOM failures on perf bots | 69 # crbug.com/501406 causes OOM failures on perf bots |
| 70 # 'http://ie.microsoft.com/testdrive/Graphics/WorkerFountains/Default.html
', | 70 # 'http://ie.microsoft.com/testdrive/Graphics/WorkerFountains/Default.html
', |
| 71 'http://ie.microsoft.com/testdrive/Graphics/TweetMap/Default.html', | 71 'http://ie.microsoft.com/testdrive/Graphics/TweetMap/Default.html', |
| 72 'http://ie.microsoft.com/testdrive/Graphics/VideoCity/Default.html', | 72 'http://ie.microsoft.com/testdrive/Graphics/VideoCity/Default.html', |
| 73 'http://ie.microsoft.com/testdrive/Performance/AsteroidBelt/Default.html', | 73 'http://ie.microsoft.com/testdrive/Performance/AsteroidBelt/Default.html', |
| 74 'http://www.smashcat.org/av/canvas_test/', | 74 'http://www.smashcat.org/av/canvas_test/', |
| 75 # pylint: disable=C0301 | 75 # pylint: disable=line-too-long |
| 76 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
canvas_sprite&back=canvas', | 76 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
canvas_sprite&back=canvas', |
| 77 # pylint: disable=C0301 | 77 # pylint: disable=line-too-long |
| 78 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
image_with_shadow&back=image', | 78 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
image_with_shadow&back=image', |
| 79 # pylint: disable=C0301 | 79 # pylint: disable=line-too-long |
| 80 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
filled_path&back=gradient', | 80 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
filled_path&back=gradient', |
| 81 # pylint: disable=C0301 | 81 # pylint: disable=line-too-long |
| 82 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
text&back=white&ball_count=15', | 82 'file://tough_canvas_cases/canvas2d_balls_common/bouncing_balls.html?ball=
text&back=white&ball_count=15', |
| 83 'file://tough_canvas_cases/canvas-font-cycler.html', | 83 'file://tough_canvas_cases/canvas-font-cycler.html', |
| 84 'file://tough_canvas_cases/canvas-animation-no-clear.html', | 84 'file://tough_canvas_cases/canvas-animation-no-clear.html', |
| 85 'file://../../../chrome/test/data/perf/canvas_bench/single_image.html', | 85 'file://../../../chrome/test/data/perf/canvas_bench/single_image.html', |
| 86 'file://../../../chrome/test/data/perf/canvas_bench/many_images.html' | 86 'file://../../../chrome/test/data/perf/canvas_bench/many_images.html' |
| 87 ] | 87 ] |
| 88 | 88 |
| 89 for url in urls_list: | 89 for url in urls_list: |
| 90 self.AddStory(ToughCanvasCasesPage(url, self)) | 90 self.AddStory(ToughCanvasCasesPage(url, self)) |
| OLD | NEW |