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

Unified Diff: chrome/browser/web_dev_style/html_checker_test.py

Issue 2091903002: [Presubmit] check for single quotes in html properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « chrome/browser/web_dev_style/html_checker.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_dev_style/html_checker_test.py
diff --git a/chrome/browser/web_dev_style/html_checker_test.py b/chrome/browser/web_dev_style/html_checker_test.py
index e2472bbef03320ce306bb614c976aba61f61a235..c9aa9de3fdcf3d182c45a45942be916e109dbcca 100755
--- a/chrome/browser/web_dev_style/html_checker_test.py
+++ b/chrome/browser/web_dev_style/html_checker_test.py
@@ -47,6 +47,15 @@ class HtmlCheckerTest(SuperMoxTestBase):
for line in lines:
self.ShouldFailCheck(line, self.checker.ClassesUseDashFormCheck)
+ def testSingleQuoteCheckFails(self):
+ lines = [
+ """ <a href='classBar'> """,
+ """<a foo="bar" href='classBar'>""",
+ """<a foo="bar" less="more" href='classBar' kittens="cats">""",
+ ]
+ for line in lines:
+ self.ShouldFailCheck(line, self.checker.DoNotUseSingleQuotesCheck)
Dan Beam 2016/06/23 19:28:03 please add things that should succeed like <b id=
dschuyler 2016/06/23 20:44:37 Done.
+
def testClassesUseDashFormCheckPasses(self):
lines = [
' class="abc" ',
« no previous file with comments | « chrome/browser/web_dev_style/html_checker.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698