Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / util / path_unittest.py
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
3 # found in the LICENSE file.
4
5 import os
6 import sys
7 import unittest
8
9 from telemetry import decorators
10 from telemetry.util import path
11
12
13 class PathTest(unittest.TestCase):
14   def testIsExecutable(self):
15     self.assertFalse(path.IsExecutable('nonexistent_file'))
16     self.assertTrue(path.IsExecutable(sys.executable))
17
18   @decorators.Enabled('win')
19   def testFindInstalledWindowsApplication(self):
20     self.assertTrue(path.FindInstalledWindowsApplication(os.path.join(
21         'Internet Explorer', 'iexplore.exe')))