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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py

Issue 2132273002: Change DepsUpdater.is_manual_test to check wpt_automation directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove print statement Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
index 50da6a5b88d41056078604d60c4ff02b21ace4af..57891306a2770cfb50ff29acf3334bc7dfff3d13 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
@@ -6,6 +6,7 @@ import unittest
from webkitpy.w3c.deps_updater import DepsUpdater
from webkitpy.common.host_mock import MockHost
+from webkitpy.common.system.filesystem_mock import MockFileSystem
class DepsUpdaterTest(unittest.TestCase):
@@ -41,3 +42,29 @@ Total: 8 tryjobs
'chromeos_daisy'
])
})
+
+ def test_is_manual_test_regular_test(self):
+ updater = DepsUpdater(MockHost())
+ fs = MockFileSystem()
+ dirname = '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/a'
+ self.assertFalse(updater.is_manual_test(fs, dirname, 'test.html'))
+ self.assertFalse(updater.is_manual_test(fs, dirname, 'manual-foo.htm'))
+ self.assertFalse(updater.is_manual_test(fs, dirname, 'script.js'))
+
+ def test_is_manual_test_no_automation_file(self):
+ updater = DepsUpdater(MockHost())
+ fs = MockFileSystem()
+ dirname = '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt/a'
+ self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.html'))
+ self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.htm'))
+ self.assertTrue(updater.is_manual_test(fs, dirname, 'test-manual.xht'))
+
+ def test_is_manual_test_with_corresponding_automation_file(self):
+ updater = DepsUpdater(MockHost())
+ imported_dir = '/mock-checkout/third_party/WebKit/LayoutTests/imported/'
+ fs = MockFileSystem(files={
+ imported_dir + 'wpt_automation/a/x-manual-input.js': '',
+ imported_dir + 'wpt_automation/a/y-manual-automation.js': '',
+ })
+ self.assertFalse(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'y-manual.html'))
+ self.assertFalse(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'x-manual.html'))
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698