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

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

Issue 2237083002: In rebaseline-cl: add option to only rebaseline tests changed in the CL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..278b7ce82203b700cacfdb22fa2079d9c9072b35
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder_unittest.py
@@ -0,0 +1,38 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import unittest
+
+from webkitpy.common.webkit_finder import WebKitFinder
+from webkitpy.common.system.filesystem_mock import MockFileSystem
+
+
+class TestWebKitFinder(unittest.TestCase):
+
+ # TODO(qyearsley): Add tests for other methods in WebKitFinder.
+ # Including tests for cases when the separator character is backslash.
+
+ def test_layout_test_name(self):
+ finder = WebKitFinder(MockFileSystem())
+ self.assertEqual(
+ finder.layout_test_name('third_party/WebKit/LayoutTests/test/name.html'),
+ 'test/name.html')
+
+ def test_layout_test_name_not_in_layout_tests_dir(self):
+ finder = WebKitFinder(MockFileSystem())
+ self.assertIsNone(finder.layout_test_name('some/other/path/file.html'))
+
+ def test_webkit_base(self):
+ finder = WebKitFinder(MockFileSystem())
+ self.assertEqual(finder.webkit_base(), '/mock-checkout/third_party/WebKit')
+
+ def test_chromium_base(self):
+ finder = WebKitFinder(MockFileSystem())
+ self.assertEqual(finder.chromium_base(), '/mock-checkout')
+
+ def test_path_from_chromium_base(self):
+ finder = WebKitFinder(MockFileSystem())
+ self.assertEqual(
+ finder.path_from_chromium_base('foo', 'bar.baz'),
+ '/mock-checkout/foo/bar.baz')

Powered by Google App Engine
This is Rietveld 408576698