| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Unit tests for Web Development Style Guide checker.""" | 6 """Unit tests for Web Development Style Guide checker.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 @media { /* TODO(dbeam) Fix this case. */ | 755 @media { /* TODO(dbeam) Fix this case. */ |
| 756 .rule { | 756 .rule { |
| 757 display: block; | 757 display: block; |
| 758 }} | 758 }} |
| 759 | 759 |
| 760 @-webkit-keyframe blah { | 760 @-webkit-keyframe blah { |
| 761 from { height: rotate(-10turn); } | 761 from { height: rotate(-10turn); } |
| 762 100% { height: 500px; } | 762 100% { height: 500px; } |
| 763 } | 763 } |
| 764 | 764 |
| 765 #rule { /* ${TemplateExpressions} should be ignored. */ |
| 766 rule: ${someValue}; |
| 767 } |
| 768 |
| 765 #rule { | 769 #rule { |
| 766 rule: value; }""", """ | 770 rule: value; }""", """ |
| 767 - Always put a rule closing brace (}) on a new line. | 771 - Always put a rule closing brace (}) on a new line. |
| 768 rule: value; }""") | 772 rule: value; }""") |
| 769 | 773 |
| 770 def testCssColonsHaveSpaceAfter(self): | 774 def testCssColonsHaveSpaceAfter(self): |
| 771 self.VerifyContentsProducesOutput(""" | 775 self.VerifyContentsProducesOutput(""" |
| 772 div:not(.class):not([attr=5]), /* We should not catch this. */ | 776 div:not(.class):not([attr=5]), /* We should not catch this. */ |
| 773 div:not(.class):not([attr]) /* Nor this. */ { | 777 div:not(.class):not([attr]) /* Nor this. */ { |
| 774 background: url(data:image/jpeg,asdfasdfsadf); /* Ignore this. */ | 778 background: url(data:image/jpeg,asdfasdfsadf); /* Ignore this. */ |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 opacity: .0; | 986 opacity: .0; |
| 983 opacity: 0.0; | 987 opacity: 0.0; |
| 984 opacity: 0.; | 988 opacity: 0.; |
| 985 border-width: 0mm; | 989 border-width: 0mm; |
| 986 height: 0cm; | 990 height: 0cm; |
| 987 width: 0in; | 991 width: 0in; |
| 988 """) | 992 """) |
| 989 | 993 |
| 990 if __name__ == '__main__': | 994 if __name__ == '__main__': |
| 991 unittest.main() | 995 unittest.main() |
| OLD | NEW |