OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """Multi tab memory test. | 5 """Multi tab memory test. |
6 | 6 |
7 This test is a multi tab test, but we're interested in measurements for | 7 This test is a multi tab test, but we're interested in measurements for |
8 the entire test rather than each single page. | 8 the entire test rather than each single page. |
9 """ | 9 """ |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 # Start measurement on the first tab. | 35 # Start measurement on the first tab. |
36 if not self._first_tab: | 36 if not self._first_tab: |
37 self._memory_metric.Start(page, tab) | 37 self._memory_metric.Start(page, tab) |
38 self._first_tab = tab | 38 self._first_tab = tab |
39 | 39 |
40 def MeasurePage(self, page, tab, results): | 40 def MeasurePage(self, page, tab, results): |
41 # Finalize measurement on the last tab. | 41 # Finalize measurement on the last tab. |
42 if len(tab.browser.tabs) == len(page.page_set.pages): | 42 if len(tab.browser.tabs) == len(page.page_set.pages): |
43 self._memory_metric.Stop(page, self._first_tab) | 43 self._memory_metric.Stop(page, self._first_tab) |
44 self._memory_metric.AddResults(self._first_tab, results) | 44 self._memory_metric.AddResults(self._first_tab, results) |
45 | |
46 def DidRunTest(self, browser, results): | |
47 self._memory_metric.AddSummaryResults(results) | |
OLD | NEW |