| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import memory_expectations |
| 5 |
| 4 from telemetry import test | 6 from telemetry import test |
| 5 from telemetry.page import page_test | 7 from telemetry.page import page_test |
| 6 from telemetry.core.timeline import counter | 8 from telemetry.core.timeline import counter |
| 7 from telemetry.core.timeline import model | 9 from telemetry.core.timeline import model |
| 8 | 10 |
| 9 MEMORY_LIMIT_MB = 256 | 11 MEMORY_LIMIT_MB = 256 |
| 10 SINGLE_TAB_LIMIT_MB = 128 | 12 SINGLE_TAB_LIMIT_MB = 128 |
| 11 WIGGLE_ROOM_MB = 4 | 13 WIGGLE_ROOM_MB = 4 |
| 12 | 14 |
| 13 test_harness_script = r""" | 15 test_harness_script = r""" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 78 |
| 77 def WillNavigateToPage(self, page, tab): | 79 def WillNavigateToPage(self, page, tab): |
| 78 custom_categories = ['webkit.console', 'gpu'] | 80 custom_categories = ['webkit.console', 'gpu'] |
| 79 tab.browser.StartTracing(','.join(custom_categories), 60) | 81 tab.browser.StartTracing(','.join(custom_categories), 60) |
| 80 | 82 |
| 81 class Memory(test.Test): | 83 class Memory(test.Test): |
| 82 """Tests GPU memory limits""" | 84 """Tests GPU memory limits""" |
| 83 test = _MemoryValidator | 85 test = _MemoryValidator |
| 84 page_set = 'page_sets/memory_tests.py' | 86 page_set = 'page_sets/memory_tests.py' |
| 85 | 87 |
| 88 def CreateExpectations(self, page_set): |
| 89 return memory_expectations.MemoryExpectations() |
| 90 |
| 86 def CreatePageSet(self, options): | 91 def CreatePageSet(self, options): |
| 87 page_set = super(Memory, self).CreatePageSet(options) | 92 page_set = super(Memory, self).CreatePageSet(options) |
| 88 for page in page_set.pages: | 93 for page in page_set.pages: |
| 89 page.script_to_evaluate_on_commit = test_harness_script | 94 page.script_to_evaluate_on_commit = test_harness_script |
| 90 return page_set | 95 return page_set |
| OLD | NEW |