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

Unified Diff: chrome/browser/resources/PRESUBMIT_test.py

Issue 809053003: Presubmit for chrome/browser/resources matches multiline metric types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« PRESUBMIT_test_mocks.py ('K') | « chrome/browser/resources/PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/PRESUBMIT_test.py
diff --git a/chrome/browser/resources/PRESUBMIT_test.py b/chrome/browser/resources/PRESUBMIT_test.py
index d46f3b708ae7907fdfb5d7535c272bd1e77eb536..923f2be1f4cad180e691f1c2265a9ab3a7397bb3 100644
--- a/chrome/browser/resources/PRESUBMIT_test.py
+++ b/chrome/browser/resources/PRESUBMIT_test.py
@@ -56,13 +56,21 @@ class HTMLActionAdditionTest(unittest.TestCase):
lines = ['<input id="testinput" pref="testpref"',
'metric="invalidaction" type="checkbox" dialog-pref>']
warnings = self._testChange(lines)
- self.assertEqual(1, len(warnings))
+ self.assertEqual(1, len(warnings), warnings)
def testInValidChange_Radio(self):
lines = ['<input id="testinput" pref="testpref"',
' metric="validaction" type="radio" dialog-pref value="string">']
warnings = self._testChange(lines)
- self.assertEqual(1, len(warnings))
+ self.assertEqual(1, len(warnings), warnings)
+
+ def testValidChange_MultilineType(self):
+ lines = ['<input id="testinput" pref="testpref"\n'
+ ' metric="validaction" type=\n'
+ ' "radio" dialog-pref value=\n'
+ ' "false">']
+ warnings = self._testChange(lines)
+ self.assertEqual([], self._testChange(lines))
def _testChange(self, lines):
mock_input_api = MockInputApi()
« PRESUBMIT_test_mocks.py ('K') | « chrome/browser/resources/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698