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

Unified Diff: PRESUBMIT_test.py

Issue 841323002: Revert of Add PRESUBMIT check if modified UMA histogram name can be found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 11 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 | « PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT_test.py
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 9d82644ac71b5d4f64376d9f590cad90f21cb043..6daae169563d4fb92cdaa78b838fadc0fdbfa98b 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -270,28 +270,6 @@ class VersionControlConflictsTest(unittest.TestCase):
self.assertTrue('3' in errors[1])
self.assertTrue('5' in errors[2])
-class UmaHistogramChangeMatchedOrNotTest(unittest.TestCase):
- def testTypicalNotMatchedChange(self):
- diff = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
- mock_input_api = MockInputApi()
- mock_input_api.files = [MockFile('some/path/foo.cc', diff)]
- warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(warnings))
- self.assertEqual('warning', warnings[0].type)
-
- def testTypicalCorrectlyMatchedChange(self):
- diff_cc = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
- diff_xml = ['<histogram name="Bla.Foo.Dummy"> </histogram>']
- mock_input_api = MockInputApi()
- mock_input_api.files = [
- MockFile('some/path/foo.cc', diff_cc),
- MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
- ]
- warnings = []
- warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
- MockOutputApi())
- self.assertEqual(0, len(warnings))
class BadExtensionsTest(unittest.TestCase):
def testBadRejFile(self):
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698