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

Side by Side Diff: test/compiler_test.dart

Issue 1022963002: pkg/csslib: fixes for args (Closed) Base URL: https://github.com/dart-lang/csslib@master
Patch Set: nits Created 5 years, 8 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
« no previous file with comments | « test/big_1_test.dart ('k') | test/declaration_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library compiler_test; 5 library compiler_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'package:csslib/parser.dart'; 9 import 'package:csslib/parser.dart';
10 import 'package:csslib/visitor.dart'; 10 import 'package:csslib/visitor.dart';
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 *|*:not(:hover) { 578 *|*:not(:hover) {
579 color: magenta; 579 color: magenta;
580 } 580 }
581 581
582 p:nth-child(3n-3) { } 582 p:nth-child(3n-3) { }
583 583
584 div:nth-child(2n) { color : red; } 584 div:nth-child(2n) { color : red; }
585 '''; 585 ''';
586 586
587 var stylesheet = 587 var stylesheet = parseCss(input, errors: errors, opts: simpleOptions);
588 parseCss(input, errors: errors, opts: ['--no-colors', 'memory']);
589 588
590 expect(stylesheet != null, true); 589 expect(stylesheet != null, true);
591 expect(errors.isEmpty, true, reason: errors.toString()); 590 expect(errors.isEmpty, true, reason: errors.toString());
592 expect(prettyPrint(stylesheet), r''' 591 expect(prettyPrint(stylesheet), r'''
593 html:lang(fr-ca) { 592 html:lang(fr-ca) {
594 quotes: '" ' ' "'; 593 quotes: '" ' ' "';
595 } 594 }
596 zoom { 595 zoom {
597 } 596 }
598 a:link { 597 a:link {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 var input = '@host { ' 647 var input = '@host { '
649 ':scope {' 648 ':scope {'
650 'white-space: nowrap;' 649 'white-space: nowrap;'
651 'overflow-style: marquee-line;' 650 'overflow-style: marquee-line;'
652 'overflow-x: marquee;' 651 'overflow-x: marquee;'
653 '}' 652 '}'
654 '* { color: red; }' 653 '* { color: red; }'
655 '*:hover { font-weight: bold; }' 654 '*:hover { font-weight: bold; }'
656 ':nth-child(odd) { color: blue; }' 655 ':nth-child(odd) { color: blue; }'
657 '}'; 656 '}';
658 var stylesheet = 657 var stylesheet = parseCss(input, errors: errors, opts: simpleOptions);
659 parseCss(input, errors: errors, opts: ['--no-colors', 'memory']);
660 658
661 expect(stylesheet != null, true); 659 expect(stylesheet != null, true);
662 expect(errors.isEmpty, true, reason: errors.toString()); 660 expect(errors.isEmpty, true, reason: errors.toString());
663 expect(prettyPrint(stylesheet), r''' 661 expect(prettyPrint(stylesheet), r'''
664 @host { 662 @host {
665 :scope { 663 :scope {
666 white-space: nowrap; 664 white-space: nowrap;
667 overflow-style: marquee-line; 665 overflow-style: marquee-line;
668 overflow-x: marquee; 666 overflow-x: marquee;
669 } 667 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 test('Selector Groups', testSelectorGroups); 717 test('Selector Groups', testSelectorGroups);
720 test('Combinator', testCombinator); 718 test('Combinator', testCombinator);
721 test('Wildcards', testWildcard); 719 test('Wildcards', testWildcard);
722 test('Pseudo', testPseudo); 720 test('Pseudo', testPseudo);
723 test('Attributes', testAttribute); 721 test('Attributes', testAttribute);
724 test('Negation', testNegation); 722 test('Negation', testNegation);
725 test('@host', testHost); 723 test('@host', testHost);
726 test('Parse List<int> as input', testArrayOfChars); 724 test('Parse List<int> as input', testArrayOfChars);
727 test('Simple Emitter', testEmitter); 725 test('Simple Emitter', testEmitter);
728 } 726 }
OLDNEW
« no previous file with comments | « test/big_1_test.dart ('k') | test/declaration_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698