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

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

Issue 2188733003: Implement functionality to cc relevant owners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: corrections 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
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 149541fb4d9f655121b9ccdcd3c494f6fa908949..b2acd87b74df07e118baca6d3d90eb5778a8cae4 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
@@ -7,6 +7,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
+from webkitpy.w3c.deps_updater import parse_directory_owners
class DepsUpdaterTest(unittest.TestCase):
@@ -68,3 +69,16 @@ Total: 8 tryjobs
})
self.assertTrue(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'x-manual.html'))
self.assertFalse(updater.is_manual_test(fs, imported_dir + 'wpt/a', 'y-manual.html'))
+
+ def test_generate_email_list(self):
+ updater = DepsUpdater(MockHost())
+ owners = {'foo/bar': 'me@gmail.com', 'foo/baz': 'you@gmail.com', 'foo/bat': 'noone@gmail.com'}
+ results = 'foo/bar/file.html\nfoo/bar/otherfile.html\nfoo/baz/files.html'
+ self.assertEqual(updater.generate_email_list(results, owners), ['me@gmail.com', 'you@gmail.com'])
qyearsley 2016/07/28 23:46:33 Test will need to be updated, I think.
+
+ def test_parse_directory_owners(self):
+ data_file = [{'notification-email': 'charizard@gmail.com', 'directory': 'foo/bar'},
+ {'notification-email': 'blastoise@gmail.com', 'directory': 'foo/baz'},
+ {'notification-email': '', 'directory': 'gol/bat'}]
+ self.assertEqual(parse_directory_owners(data_file),
+ {'foo/bar': 'charizard@gmail.com', 'foo/baz': 'blastoise@gmail.com'})

Powered by Google App Engine
This is Rietveld 408576698