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

Side by Side Diff: chrome/browser/web_dev_style/css_checker_test.py

Issue 2345703004: web_dev_style: ignore --css-vars from alphabetical ordering requirement (Closed)
Patch Set: such tragic misspelling Created 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import css_checker 6 import css_checker
7 from os import path as os_path 7 from os import path as os_path
8 import re 8 import re
9 from sys import path as sys_path 9 from sys import path as sys_path
10 import unittest 10 import unittest
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 def testCssAlphaWithLongerDashedProps(self): 126 def testCssAlphaWithLongerDashedProps(self):
127 self.VerifyContentsProducesOutput(""" 127 self.VerifyContentsProducesOutput("""
128 div { 128 div {
129 border-left: 5px; /* A hopefully removed comment. */ 129 border-left: 5px; /* A hopefully removed comment. */
130 border: 5px solid red; 130 border: 5px solid red;
131 }""", """ 131 }""", """
132 - Alphabetize properties and list vendor specific (i.e. -webkit) above standard. 132 - Alphabetize properties and list vendor specific (i.e. -webkit) above standard.
133 border-left: 5px; 133 border-left: 5px;
134 border: 5px solid red;""") 134 border: 5px solid red;""")
135 135
136 def testAlphaIgnoresVariables(self):
137 self.VerifyContentsIsValid("""
138 #id {
139 --zzyxx-xylophone: 3px;
140 --aardvark-animal: var(--zzyxz-xylophone);
dschuyler 2016/09/15 23:17:36 maybe add: --two-line: var(--second-line); -
dschuyler 2016/09/15 23:48:35 With my better understanding of the mixins being r
141 }""")
142
136 def testCssBracesHaveSpaceBeforeAndNothingAfter(self): 143 def testCssBracesHaveSpaceBeforeAndNothingAfter(self):
137 self.VerifyContentsProducesOutput(""" 144 self.VerifyContentsProducesOutput("""
138 /* Hello! */div/* Comment here*/{ 145 /* Hello! */div/* Comment here*/{
139 display: block; 146 display: block;
140 } 147 }
141 148
142 blah /* hey! */ 149 blah /* hey! */
143 { 150 {
144 rule: value; 151 rule: value;
145 } 152 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 opacity: 0.0; 431 opacity: 0.0;
425 opacity: 0.; 432 opacity: 0.;
426 border-width: 0mm; 433 border-width: 0mm;
427 height: 0cm; 434 height: 0cm;
428 width: 0in; 435 width: 0in;
429 """) 436 """)
430 437
431 438
432 if __name__ == '__main__': 439 if __name__ == '__main__':
433 unittest.main() 440 unittest.main()
OLDNEW
« chrome/browser/web_dev_style/css_checker.py ('K') | « chrome/browser/web_dev_style/css_checker.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698