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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py

Issue 2829993002: webkitpy: Prevent the addition of duplicate virtual tests. (Closed)
Patch Set: Created 3 years, 8 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/layout_tests/port/base.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/layout_tests/port/base_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
index dabb72b00fc9875aa67381c9589780c9a11ac916..e5a143a786dd0c8b324d981c92273188441943b2 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
@@ -483,6 +483,17 @@ class PortTest(unittest.TestCase):
# If this call returns successfully, we found and loaded the LayoutTests/VirtualTestSuites.
_ = port.virtual_test_suites()
+ def test_duplicate_virtual_test_suite_in_file(self):
+ port = self.make_port()
+ port.host.filesystem.write_text_file(
+ port.host.filesystem.join(port.layout_tests_dir(), 'VirtualTestSuites'),
+ '['
+ '{"prefix": "bar", "base": "fast/bar", "args": ["--bar"]},'
+ '{"prefix": "bar", "base": "fast/bar", "args": ["--bar"]}'
+ ']')
+
+ self.assertRaises(ValueError, port.virtual_test_suites)
+
def test_virtual_test_suite_file_is_not_json(self):
port = self.make_port()
port.host.filesystem.write_text_file(
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698