| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 unittest | 5 import unittest |
| 6 | 6 |
| 7 from webkitpy.common.webkit_finder import WebKitFinder | 7 from webkitpy.common.blink_finder import BlinkFinder |
| 8 from webkitpy.common.system.filesystem_mock import MockFileSystem | 8 from webkitpy.common.system.filesystem_mock import MockFileSystem |
| 9 | 9 |
| 10 | 10 |
| 11 class TestWebKitFinder(unittest.TestCase): | 11 class TestBlinkFinder(unittest.TestCase): |
| 12 | 12 |
| 13 # TODO(qyearsley): Add tests for other methods in WebKitFinder. | 13 # TODO(qyearsley): Add tests for other methods in BlinkFinder. |
| 14 # Including tests for cases when the separator character is backslash. | 14 # Including tests for cases when the separator character is backslash. |
| 15 | 15 |
| 16 def test_layout_test_name(self): | 16 def test_layout_test_name(self): |
| 17 finder = WebKitFinder(MockFileSystem()) | 17 finder = BlinkFinder(MockFileSystem()) |
| 18 self.assertEqual( | 18 self.assertEqual( |
| 19 finder.layout_test_name('third_party/WebKit/LayoutTests/test/name.ht
ml'), | 19 finder.layout_test_name('third_party/WebKit/LayoutTests/test/name.ht
ml'), |
| 20 'test/name.html') | 20 'test/name.html') |
| 21 | 21 |
| 22 def test_layout_test_name_not_in_layout_tests_dir(self): | 22 def test_layout_test_name_not_in_layout_tests_dir(self): |
| 23 finder = WebKitFinder(MockFileSystem()) | 23 finder = BlinkFinder(MockFileSystem()) |
| 24 self.assertIsNone(finder.layout_test_name('some/other/path/file.html')) | 24 self.assertIsNone(finder.layout_test_name('some/other/path/file.html')) |
| 25 | 25 |
| 26 def test_webkit_base(self): | 26 def test_blink_base(self): |
| 27 finder = WebKitFinder(MockFileSystem()) | 27 finder = BlinkFinder(MockFileSystem()) |
| 28 self.assertEqual(finder.webkit_base(), '/mock-checkout/third_party/WebKi
t') | 28 self.assertEqual(finder.blink_base(), '/mock-checkout/third_party/WebKit
') |
| 29 | 29 |
| 30 def test_chromium_base(self): | 30 def test_chromium_base(self): |
| 31 finder = WebKitFinder(MockFileSystem()) | 31 finder = BlinkFinder(MockFileSystem()) |
| 32 self.assertEqual(finder.chromium_base(), '/mock-checkout') | 32 self.assertEqual(finder.chromium_base(), '/mock-checkout') |
| 33 | 33 |
| 34 def test_path_from_chromium_base(self): | 34 def test_path_from_chromium_base(self): |
| 35 finder = WebKitFinder(MockFileSystem()) | 35 finder = BlinkFinder(MockFileSystem()) |
| 36 self.assertEqual( | 36 self.assertEqual( |
| 37 finder.path_from_chromium_base('foo', 'bar.baz'), | 37 finder.path_from_chromium_base('foo', 'bar.baz'), |
| 38 '/mock-checkout/foo/bar.baz') | 38 '/mock-checkout/foo/bar.baz') |
| OLD | NEW |