OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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() |
OLD | NEW |