Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder_unittest.py

Issue 2878873002: webkitpy: Rename WebKitFinder to PathFinder (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import unittest
6
7 from webkitpy.common.webkit_finder import WebKitFinder
8 from webkitpy.common.system.filesystem_mock import MockFileSystem
9
10
11 class TestWebKitFinder(unittest.TestCase):
12
13 # TODO(qyearsley): Add tests for other methods in WebKitFinder.
14 # Including tests for cases when the separator character is backslash.
15
16 def test_layout_test_name(self):
17 finder = WebKitFinder(MockFileSystem())
18 self.assertEqual(
19 finder.layout_test_name('third_party/WebKit/LayoutTests/test/name.ht ml'),
20 'test/name.html')
21
22 def test_layout_test_name_not_in_layout_tests_dir(self):
23 finder = WebKitFinder(MockFileSystem())
24 self.assertIsNone(finder.layout_test_name('some/other/path/file.html'))
25
26 # pylint: disable=protected-access
27 def test_webkit_base(self):
28 finder = WebKitFinder(MockFileSystem())
29 self.assertEqual(finder._webkit_base(), '/mock-checkout/third_party/WebK it')
30
31 def test_chromium_base(self):
32 finder = WebKitFinder(MockFileSystem())
33 self.assertEqual(finder.chromium_base(), '/mock-checkout')
34
35 def test_path_from_chromium_base(self):
36 finder = WebKitFinder(MockFileSystem())
37 self.assertEqual(
38 finder.path_from_chromium_base('foo', 'bar.baz'),
39 '/mock-checkout/foo/bar.baz')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698