Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: tools/perf/measurements/page_cycler_unittest.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | tools/perf/measurements/power.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import sys 5 import sys
6 import unittest 6 import unittest
7 7
8 from metrics import keychain_metric
9 from telemetry.core import browser_options 8 from telemetry.core import browser_options
10 from telemetry.results import page_test_results 9 from telemetry.results import page_test_results
11 from telemetry.unittest_util import simple_mock 10 from telemetry.unittest_util import simple_mock
12 from telemetry.user_story import user_story_runner 11 from telemetry.user_story import user_story_runner
13 12
14 from measurements import page_cycler 13 from measurements import page_cycler
14 from metrics import keychain_metric
15 15
16 16
17 # Allow testing protected members in the unit test. 17 # Allow testing protected members in the unit test.
18 # pylint: disable=W0212 18 # pylint: disable=W0212
19 19
20 class MockMemoryMetric(object): 20 class MockMemoryMetric(object):
21 """Used instead of simple_mock.MockObject so that the precise order and 21 """Used instead of simple_mock.MockObject so that the precise order and
22 number of calls need not be specified.""" 22 number of calls need not be specified."""
23 def __init__(self): 23 def __init__(self):
24 pass 24 pass
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 # does an initial navigate to avoid paying for a cross-renderer navigation. 252 # does an initial navigate to avoid paying for a cross-renderer navigation.
253 cycler = self.SetUpCycler(setup_memory_module=True) 253 cycler = self.SetUpCycler(setup_memory_module=True)
254 pages = [FakePage('file://fakepage1.com'), FakePage('file://fakepage2.com')] 254 pages = [FakePage('file://fakepage1.com'), FakePage('file://fakepage2.com')]
255 tab = FakeTab() 255 tab = FakeTab()
256 256
257 self.assertEqual([], tab.navigated_urls) 257 self.assertEqual([], tab.navigated_urls)
258 for page in pages * 2: 258 for page in pages * 2:
259 cycler.WillNavigateToPage(page, tab) 259 cycler.WillNavigateToPage(page, tab)
260 self.assertEqual( 260 self.assertEqual(
261 ['http://fakeserver:99999/nonexistent.html'], tab.navigated_urls) 261 ['http://fakeserver:99999/nonexistent.html'], tab.navigated_urls)
OLDNEW
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | tools/perf/measurements/power.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698