| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 os | 5 import os |
| 6 import sys | 6 import sys |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from telemetry import decorators | 9 from telemetry import decorators |
| 10 from telemetry.internal.util import path | 10 from telemetry.internal.util import path |
| 11 | 11 |
| 12 | 12 |
| 13 class PathTest(unittest.TestCase): | 13 class PathTest(unittest.TestCase): |
| 14 def testIsExecutable(self): | 14 def testIsExecutable(self): |
| 15 self.assertFalse(path.IsExecutable('nonexistent_file')) | 15 self.assertFalse(path.IsExecutable('nonexistent_file')) |
| 16 self.assertTrue(path.IsExecutable(sys.executable)) | 16 self.assertTrue(path.IsExecutable(sys.executable)) |
| 17 | 17 |
| 18 @decorators.Enabled('win') | 18 @decorators.Enabled('win') |
| 19 def testFindInstalledWindowsApplication(self): | 19 def testFindInstalledWindowsApplication(self): |
| 20 self.assertTrue(path.FindInstalledWindowsApplication(os.path.join( | 20 self.assertTrue(path.FindInstalledWindowsApplication(os.path.join( |
| 21 'Internet Explorer', 'iexplore.exe'))) | 21 'Internet Explorer', 'iexplore.exe'))) |
| 22 |
| 23 @decorators.Enabled('win') |
| 24 def testFindInstalledWindowsApplicationWithWildcards(self): |
| 25 self.assertTrue(path.FindInstalledWindowsApplication(os.path.join( |
| 26 '*', 'iexplore.exe'))) |
| OLD | NEW |