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

Side by Side Diff: tools/testing/dart/multitest.dart

Issue 1028453002: Support percent encoded data URIs in the standalone embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
« no previous file with comments | « runtime/tests/vm/dart/data_uri_spawn_test.dart ('k') | no next file » | 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 multitest; 5 library multitest;
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:io"; 8 import "dart:io";
9 9
10 import "path.dart"; 10 import "path.dart";
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Find all relative imports and copy them into the dir that contains 181 // Find all relative imports and copy them into the dir that contains
182 // the generated tests. 182 // the generated tests.
183 Set<String> _findAllRelativeImports(Path topLibrary) { 183 Set<String> _findAllRelativeImports(Path topLibrary) {
184 Set<Path> toSearch = new Set<Path>.from([topLibrary]); 184 Set<Path> toSearch = new Set<Path>.from([topLibrary]);
185 Set<String> foundImports = new Set<String>(); 185 Set<String> foundImports = new Set<String>();
186 Path libraryDir = topLibrary.directoryPath; 186 Path libraryDir = topLibrary.directoryPath;
187 RegExp relativeImportRegExp = new RegExp( 187 RegExp relativeImportRegExp = new RegExp(
188 '^(?:@.*\\s+)?' // Allow for a meta-data annotation. 188 '^(?:@.*\\s+)?' // Allow for a meta-data annotation.
189 '(import|part)' 189 '(import|part)'
190 '\\s+["\']' 190 '\\s+["\']'
191 '(?!(dart:|dart-ext:|package:|/))' // Look-ahead: not in package. 191 '(?!(dart:|dart-ext:|data:|package:|/))' // Look-ahead: not in package.
192 '([^"\']*)' // The path to the imported file. 192 '([^"\']*)' // The path to the imported file.
193 '["\']'); 193 '["\']');
194 while (!toSearch.isEmpty) { 194 while (!toSearch.isEmpty) {
195 var thisPass = toSearch; 195 var thisPass = toSearch;
196 toSearch = new Set<Path>(); 196 toSearch = new Set<Path>();
197 for (Path filename in thisPass) { 197 for (Path filename in thisPass) {
198 File f = new File(filename.toNativePath()); 198 File f = new File(filename.toNativePath());
199 for (String line in f.readAsLinesSync()) { 199 for (String line in f.readAsLinesSync()) {
200 Match match = relativeImportRegExp.firstMatch(line); 200 Match match = relativeImportRegExp.firstMatch(line);
201 if (match != null) { 201 if (match != null) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // TestSuite.forDirectory. 301 // TestSuite.forDirectory.
302 split.removeLast(); 302 split.removeLast();
303 } 303 }
304 String path = '${generatedTestDir.path}/${split.last}'; 304 String path = '${generatedTestDir.path}/${split.last}';
305 Directory dir = new Directory(path); 305 Directory dir = new Directory(path);
306 if (!dir.existsSync()) { 306 if (!dir.existsSync()) {
307 dir.createSync(); 307 dir.createSync();
308 } 308 }
309 return new Path(new File(path).absolute.path); 309 return new Path(new File(path).absolute.path);
310 } 310 }
OLDNEW
« no previous file with comments | « runtime/tests/vm/dart/data_uri_spawn_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698