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

Side by Side Diff: samples/third_party/dromaeo/Suites.dart

Issue 10389097: Move dart:dom to dart:dom_deprecated (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes from review Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 #library('Suites.dart'); 1 #library('Suites.dart');
2 2
3 class Origin { 3 class Origin {
4 final String author; 4 final String author;
5 final String url; 5 final String url;
6 6
7 const Origin(this.author, this.url); 7 const Origin(this.author, this.url);
8 } 8 }
9 9
10 class SuiteDescription { 10 class SuiteDescription {
11 final String file; 11 final String file;
12 final String name; 12 final String name;
13 final Origin origin; 13 final Origin origin;
14 final String description; 14 final String description;
15 final List<String> tags; 15 final List<String> tags;
16 16
17 const SuiteDescription(this.file, this.name, this.origin, 17 const SuiteDescription(this.file, this.name, this.origin,
18 this.description, this.tags); 18 this.description, this.tags);
19 } 19 }
20 20
21 class Suites { 21 class Suites {
22 static final JOHN_RESIG = const Origin('John Resig', 'http://ejohn.org/'); 22 static final JOHN_RESIG = const Origin('John Resig', 'http://ejohn.org/');
23 23
24 static final CATEGORIES = const { 24 static final CATEGORIES = const {
25 'dom': 'DOM Core Tests (dart:dom)', 25 'dom': 'DOM Core Tests (dart:dom_deprecated)',
26 'html': 'DOM Core Tests (dart:html)', 26 'html': 'DOM Core Tests (dart:html)',
27 'htmlidiomatic': 'DOM Core Tests (dart:html) Idiomatic', 27 'htmlidiomatic': 'DOM Core Tests (dart:html) Idiomatic',
28 'js': 'DOM Core Tests (JavaScript)', 28 'js': 'DOM Core Tests (JavaScript)',
29 'dart': 'DOM Core Tests (dart)', 29 'dart': 'DOM Core Tests (dart)',
30 'frog': 'DOM Core Tests (frog)', 30 'frog': 'DOM Core Tests (frog)',
31 }; 31 };
32 32
33 static final _CORE_SUITE_DESCRIPTIONS = const [ 33 static final _CORE_SUITE_DESCRIPTIONS = const [
34 const SuiteDescription( 34 const SuiteDescription(
35 'dom-attr.html', 35 'dom-attr.html',
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 static List<SuiteDescription> get SUITE_DESCRIPTIONS() { 90 static List<SuiteDescription> get SUITE_DESCRIPTIONS() {
91 if (null !== _SUITE_DESCRIPTIONS) { 91 if (null !== _SUITE_DESCRIPTIONS) {
92 return _SUITE_DESCRIPTIONS; 92 return _SUITE_DESCRIPTIONS;
93 } 93 }
94 _SUITE_DESCRIPTIONS = <SuiteDescription>[]; 94 _SUITE_DESCRIPTIONS = <SuiteDescription>[];
95 add(variant, mapper, tags) { 95 add(variant, mapper, tags) {
96 _SUITE_DESCRIPTIONS.addAll( 96 _SUITE_DESCRIPTIONS.addAll(
97 getVariants(_CORE_SUITE_DESCRIPTIONS, variant, mapper, tags)); 97 getVariants(_CORE_SUITE_DESCRIPTIONS, variant, mapper, tags));
98 } 98 }
99 add('js', _jsPath, ['js']); 99 add('js', _jsPath, ['js']);
100 add('dart:dom', _domPath, ['dart', 'dom']); 100 add('dart:dom_deprecated', _domPath, ['dart', 'dom']);
101 add('dart:html', _htmlPath, ['dart', 'html']); 101 add('dart:html', _htmlPath, ['dart', 'html']);
102 add('dart:html idiomatic', _htmlPath, ['dart', 'htmlidiomatic']); 102 add('dart:html idiomatic', _htmlPath, ['dart', 'htmlidiomatic']);
103 add('frog dart:dom', _frogDomPath, ['frog', 'dom']); 103 add('frog dart:dom_deprecated', _frogDomPath, ['frog', 'dom']);
104 add('frog dart:html', _frogHtmlPath, ['frog', 'html']); 104 add('frog dart:html', _frogHtmlPath, ['frog', 'html']);
105 add('frog dart:html idiomatic', _frogHtmlIdiomaticPath, 105 add('frog dart:html idiomatic', _frogHtmlIdiomaticPath,
106 ['frog', 'htmlidiomatic']); 106 ['frog', 'htmlidiomatic']);
107 return _SUITE_DESCRIPTIONS; 107 return _SUITE_DESCRIPTIONS;
108 } 108 }
109 109
110 static List<SuiteDescription> getSuites(String tags) { 110 static List<SuiteDescription> getSuites(String tags) {
111 // A disjunction of conjunctions (e.g., 111 // A disjunction of conjunctions (e.g.,
112 // 'js&modify|dart&dom&modify'). 112 // 'js&modify|dart&dom&modify').
113 final taglist = tags.split('|').map((tag) => tag.split('&')); 113 final taglist = tags.split('|').map((tag) => tag.split('&'));
(...skipping 18 matching lines...) Expand all
132 return CATEGORIES[tags]; 132 return CATEGORIES[tags];
133 } 133 }
134 for (final suite in _CORE_SUITE_DESCRIPTIONS) { 134 for (final suite in _CORE_SUITE_DESCRIPTIONS) {
135 if (suite.tags[0] == tags) { 135 if (suite.tags[0] == tags) {
136 return suite.name; 136 return suite.name;
137 } 137 }
138 } 138 }
139 return null; 139 return null;
140 } 140 }
141 } 141 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/Dromaeo.dart ('k') | samples/third_party/dromaeo/tests/RunnerSuite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698