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 unittest | 4 import unittest |
5 | 5 |
6 from telemetry import browser_options | 6 from telemetry.core import browser_options |
7 from telemetry import desktop_browser_finder | 7 from telemetry.core.chrome import desktop_browser_finder |
8 from telemetry import system_stub | 8 from telemetry.test import system_stub |
9 | 9 |
10 # This file verifies the logic for finding a browser instance on all platforms | 10 # This file verifies the logic for finding a browser instance on all platforms |
11 # at once. It does so by providing stubs for the OS/sys/subprocess primitives | 11 # at once. It does so by providing stubs for the OS/sys/subprocess primitives |
12 # that the underlying finding logic usually uses to locate a suitable browser. | 12 # that the underlying finding logic usually uses to locate a suitable browser. |
13 # We prefer this approach to having to run the same test on every platform on | 13 # We prefer this approach to having to run the same test on every platform on |
14 # which we want this code to work. | 14 # which we want this code to work. |
15 | 15 |
16 class FindTestBase(unittest.TestCase): | 16 class FindTestBase(unittest.TestCase): |
17 def setUp(self): | 17 def setUp(self): |
18 self._options = browser_options.BrowserOptions() | 18 self._options = browser_options.BrowserOptions() |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 def testFindAllWithExact(self): | 180 def testFindAllWithExact(self): |
181 self._options.browser_executable = 'c:\\tmp\\chrome.exe' | 181 self._options.browser_executable = 'c:\\tmp\\chrome.exe' |
182 types = self.DoFindAllTypes() | 182 types = self.DoFindAllTypes() |
183 self.assertEquals( | 183 self.assertEquals( |
184 set(types), | 184 set(types), |
185 set(['exact', | 185 set(['exact', |
186 'debug', 'release', | 186 'debug', 'release', |
187 'content-shell-debug', 'content-shell-release', | 187 'content-shell-debug', 'content-shell-release', |
188 'system', 'canary'])) | 188 'system', 'canary'])) |
OLD | NEW |