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

Unified Diff: chrome/browser/test_presubmit.py

Issue 585053003: web_dev_style: enhance <include> presubmit to account for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/browser/web_dev_style/resource_checker.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/test_presubmit.py
diff --git a/chrome/browser/test_presubmit.py b/chrome/browser/test_presubmit.py
index c175d338bd9d9d30fd40dfd94d07ef0da92f6e29..d1f29d7648d141ee0c125c4b8946356542fc73e0 100755
--- a/chrome/browser/test_presubmit.py
+++ b/chrome/browser/test_presubmit.py
@@ -42,7 +42,8 @@ class ResourceStyleGuideTest(SuperMoxTestBase):
error = self.checker.IncludeCheck(1, line)
self.assertNotEqual('', error,
'Should be flagged as style error: ' + line)
- self.assertEqual(GetHighlight(line, error), '</include>')
+ highlight = GetHighlight(line, error).strip()
+ self.assertTrue('include' in highlight and highlight[0] == '<')
def ShouldPassIncludeCheck(self, line):
"""Checks that the '</include>' checker doesn't flag |line| as an error."""
@@ -54,6 +55,8 @@ class ResourceStyleGuideTest(SuperMoxTestBase):
"</include> ",
" </include>",
" </include> ",
+ ' <include src="blah.js" /> ',
+ '<include src="blee.js"/>',
]
for line in lines:
self.ShouldFailIncludeCheck(line)
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/resource_checker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698