| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #import("../../../css/css.dart"); | 5 #import("../../../css/css.dart"); |
| 6 | 6 |
| 7 class DeclarationTest { | 7 class DeclarationTest { |
| 8 | 8 |
| 9 static testMain() { | 9 static testMain() { |
| 10 initCssWorld(); | 10 initCssWorld(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 " background-image: url(\"http://double_quote.html\");\n" + | 63 " background-image: url(\"http://double_quote.html\");\n" + |
| 64 " background-image: url('http://single_quote.html');\n" + | 64 " background-image: url('http://single_quote.html');\n" + |
| 65 " color: rgba(10,20,255); <!-- test CDO/CDC -->\n" + | 65 " color: rgba(10,20,255); <!-- test CDO/CDC -->\n" + |
| 66 " color: #123aef; /* hex # part integer and part identifier */\n" + | 66 " color: #123aef; /* hex # part integer and part identifier */\n" + |
| 67 "}\n"; | 67 "}\n"; |
| 68 final String generated = | 68 final String generated = |
| 69 "\n" + | 69 "\n" + |
| 70 ".more {\n" + | 70 ".more {\n" + |
| 71 " color: #ff0000;\n" + | 71 " color: #ff0000;\n" + |
| 72 " color: #aabbcc;\n" + | 72 " color: #aabbcc;\n" + |
| 73 " color: #ff;\n" + | 73 " color: #0ff;\n" + |
| 74 " background-image: url(http://test.jpeg);\n" + | 74 " background-image: url(http://test.jpeg);\n" + |
| 75 " background-image: url(http://double_quote.html);\n" + | 75 " background-image: url(http://double_quote.html);\n" + |
| 76 " background-image: url(http://single_quote.html);\n" + | 76 " background-image: url(http://single_quote.html);\n" + |
| 77 " color: rgba(10, 20, 255);\n" + | 77 " color: rgba(10, 20, 255);\n" + |
| 78 " color: #123aef;\n" + | 78 " color: #123aef;\n" + |
| 79 "}\n"; | 79 "}\n"; |
| 80 | 80 |
| 81 Parser parser = | 81 Parser parser = |
| 82 new Parser(new SourceFile(SourceFile.IN_MEMORY_FILE, input)); | 82 new Parser(new SourceFile(SourceFile.IN_MEMORY_FILE, input)); |
| 83 | 83 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 Stylesheet stylesheet = parser.parse(); | 246 Stylesheet stylesheet = parser.parse(); |
| 247 Expect.isNotNull(stylesheet); | 247 Expect.isNotNull(stylesheet); |
| 248 | 248 |
| 249 Expect.equals(generated, stylesheet.toString()); | 249 Expect.equals(generated, stylesheet.toString()); |
| 250 } | 250 } |
| 251 } | 251 } |
| 252 | 252 |
| 253 main() { | 253 main() { |
| 254 DeclarationTest.testMain(); | 254 DeclarationTest.testMain(); |
| 255 } | 255 } |
| OLD | NEW |