Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 os | 4 import os |
| 5 import unittest | 5 import unittest |
| 6 | 6 |
| 7 from telemetry import benchmark | 7 from telemetry import benchmark |
| 8 from telemetry.core import discover | |
| 9 from telemetry.core import exceptions | 8 from telemetry.core import exceptions |
| 10 from telemetry.core import util | 9 from telemetry.core import util |
| 11 from telemetry.story import story_set as story_set_module | 10 from telemetry.story import story_set as story_set_module |
| 12 from telemetry.testing import fakes | 11 from telemetry.testing import fakes |
| 13 | 12 |
| 14 import mock # pylint: disable=import-error | 13 import mock # pylint: disable=import-error |
| 15 | 14 |
| 16 import gpu_test_base | 15 import gpu_test_base |
| 17 | 16 |
| 18 def _GetGpuDir(*subdirs): | |
| 19 gpu_dir = os.path.dirname(os.path.dirname(__file__)) | |
| 20 return os.path.join(gpu_dir, *subdirs) | |
|
Ken Russell (switch to Gerrit)
2015/09/22 03:30:15
This was left over from the previous cleanup.
| |
| 21 | |
| 22 # Unit tests verifying invariants of classes in GpuTestBase. | 17 # Unit tests verifying invariants of classes in GpuTestBase. |
| 23 | 18 |
| 24 # | 19 # |
| 25 # Tests verifying interactions between Telemetry and GpuTestBase. | 20 # Tests verifying interactions between Telemetry and GpuTestBase. |
| 26 # | 21 # |
| 27 | 22 |
| 28 class FakeValidator(gpu_test_base.ValidatorBase): | 23 class FakeValidator(gpu_test_base.ValidatorBase): |
| 29 def __init__(self, manager_mock=None): | 24 def __init__(self, manager_mock=None): |
| 30 super(FakeValidator, self).__init__() | 25 super(FakeValidator, self).__init__() |
| 31 if manager_mock == None: | 26 if manager_mock == None: |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 mock.call.page2.RunNavigateSteps(mock.ANY), | 390 mock.call.page2.RunNavigateSteps(mock.ANY), |
| 396 mock.call.validator.WillNavigateToPage( | 391 mock.call.validator.WillNavigateToPage( |
| 397 page2, mock.ANY), | 392 page2, mock.ANY), |
| 398 mock.call.page2.RunNavigateSteps(mock.ANY), | 393 mock.call.page2.RunNavigateSteps(mock.ANY), |
| 399 mock.call.validator.DidNavigateToPage( | 394 mock.call.validator.DidNavigateToPage( |
| 400 page2, mock.ANY), | 395 page2, mock.ANY), |
| 401 mock.call.page2.RunPageInteractions(mock.ANY), | 396 mock.call.page2.RunPageInteractions(mock.ANY), |
| 402 mock.call.validator.ValidateAndMeasurePage( | 397 mock.call.validator.ValidateAndMeasurePage( |
| 403 page2, mock.ANY, mock.ANY)] | 398 page2, mock.ANY, mock.ANY)] |
| 404 self.assertTrue(manager.mock_calls == expected) | 399 self.assertTrue(manager.mock_calls == expected) |
| OLD | NEW |