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

Unified Diff: packages/csslib/test/declaration_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/csslib/pubspec.yaml ('k') | packages/csslib/test/examples/base.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/csslib/test/declaration_test.dart
diff --git a/packages/csslib/test/declaration_test.dart b/packages/csslib/test/declaration_test.dart
index af6fdefcf86199247837fd1b74c7ec78a23f883c..ab1f70df03faa83127d69496111914cce1a53f88 100644
--- a/packages/csslib/test/declaration_test.dart
+++ b/packages/csslib/test/declaration_test.dart
@@ -478,6 +478,30 @@ void testMediaQueries() {
expect(
errors.first.message, contains('expected { after media before ruleset'));
expect(errors.first.span.text, '(');
+
+ // Test nested at-rules.
+ input = '''
+@media (min-width: 840px) {
+ .cell {
+ width: calc(33% - 16px);
+ }
+ @supports (display: grid) {
+ .cell {
+ grid-column-end: span 4;
+ }
+ }
+}''';
+ generated = '''@media (min-width:840px) {
+.cell {
+ width: calc(33% - 16px);
+}
+@supports (display: grid) {
+.cell {
+ grid-column-end: span 4;
+}
+}
+}''';
+ expectCss(input, generated);
}
void testMozDocument() {
@@ -1260,6 +1284,16 @@ void testExpressionSpans() {
expect((decl as Declaration).expression.span.text, '50px');
}
+void testComments() {
+ final css = '''/* This comment has a nested HTML comment...
+* <html>
+* <!-- Nested HTML comment... -->
+* <div></div>
+* </html>
+*/''';
+ expectCss(css, '');
+}
+
void simpleCalc() {
final input = r'''.foo { height: calc(100% - 55px); }''';
var stylesheet = parseCss(input);
@@ -1351,6 +1385,7 @@ main() {
test('Expression spans', testExpressionSpans,
skip: 'expression spans are broken'
' (https://github.com/dart-lang/csslib/issues/15)');
+ test('Comments', testComments);
group('calc function', () {
test('simple calc', simpleCalc);
test('single complex', complexCalc);
« no previous file with comments | « packages/csslib/pubspec.yaml ('k') | packages/csslib/test/examples/base.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698