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 | 4 |
5 import os | 5 import os |
6 import sys | 6 import sys |
7 import unittest | 7 import unittest |
8 import StringIO | 8 import StringIO |
9 | 9 |
10 import mock # pylint: disable=F0401 | 10 import mock # pylint: disable=import-error |
11 | 11 |
12 import fetch_benchmark_deps | 12 import fetch_benchmark_deps |
13 | 13 |
14 | 14 |
15 def NormPaths(paths): | 15 def NormPaths(paths): |
16 return sorted([os.path.normcase(p) for p in paths.splitlines()]) | 16 return sorted([os.path.normcase(p) for p in paths.splitlines()]) |
17 | 17 |
18 | 18 |
19 class FetchBenchmarkDepsUnittest(unittest.TestCase): | 19 class FetchBenchmarkDepsUnittest(unittest.TestCase): |
20 """The test guards fetch_benchmark_deps. | 20 """The test guards fetch_benchmark_deps. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 def testFetchServingDirs(self): | 64 def testFetchServingDirs(self): |
65 self._RunFetchBenchmarkDepsTest('media.tough_video_cases') | 65 self._RunFetchBenchmarkDepsTest('media.tough_video_cases') |
66 | 66 |
67 def testFetchOctane(self): | 67 def testFetchOctane(self): |
68 octane_wpr_path = os.path.join( | 68 octane_wpr_path = os.path.join( |
69 os.path.dirname(__file__), 'page_sets', 'data', 'octane_001.wpr') | 69 os.path.dirname(__file__), 'page_sets', 'data', 'octane_001.wpr') |
70 expected = os.path.relpath(octane_wpr_path, | 70 expected = os.path.relpath(octane_wpr_path, |
71 fetch_benchmark_deps.GetChromiumDir()) | 71 fetch_benchmark_deps.GetChromiumDir()) |
72 self._RunFetchBenchmarkDepsTest('octane', NormPaths(expected)) | 72 self._RunFetchBenchmarkDepsTest('octane', NormPaths(expected)) |
OLD | NEW |