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

Side by Side Diff: tests/standalone/io/skipping_dart2js_compilations_test.dart

Issue 46063010: Change dart:io Platform.script to return a Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 1 month 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /* 5 /*
6 * This test makes sure that the "skipping Dart2Js compilations if the output is 6 * This test makes sure that the "skipping Dart2Js compilations if the output is
7 * already up to date" feature does work as it should. 7 * already up to date" feature does work as it should.
8 * Therefore this test ensures that compilations are only skipped if the last 8 * Therefore this test ensures that compilations are only skipped if the last
9 * modified date of the output of a dart2js compilation is newer than 9 * modified date of the output of a dart2js compilation is newer than
10 * - the the dart application to compile (including it's dependencies) 10 * - the the dart application to compile (including it's dependencies)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 .existsSync()); 141 .existsSync());
142 } else { 142 } else {
143 Expect.isFalse(new File(fileUtils.scriptOutputPath.toNativePath()) 143 Expect.isFalse(new File(fileUtils.scriptOutputPath.toNativePath())
144 .existsSync()); 144 .existsSync());
145 } 145 }
146 } 146 }
147 } 147 }
148 148
149 runner.Command makeCompilationCommand(String testName, FileUtils fileUtils) { 149 runner.Command makeCompilationCommand(String testName, FileUtils fileUtils) {
150 var config = new options.TestOptionsParser().parse(['--timeout', '2'])[0]; 150 var config = new options.TestOptionsParser().parse(['--timeout', '2'])[0];
151 var createFileScript = join(dirname(Platform.script), 151 var createFileScript = Platform.script
152 'skipping_dart2js_compilations_helper.dart'); 152 .resolve('skipping_dart2js_compilations_helper.dart').toFilePath();
153 var executable = Platform.executable; 153 var executable = Platform.executable;
154 var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()]; 154 var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()];
155 var bootstrapDeps = [ 155 var bootstrapDeps = [
156 Uri.parse("file://${fileUtils.testSnapshotFilePath}")]; 156 Uri.parse("file://${fileUtils.testSnapshotFilePath}")];
157 return runner.CommandBuilder.instance.getCompilationCommand( 157 return runner.CommandBuilder.instance.getCompilationCommand(
158 'dart2js', 158 'dart2js',
159 fileUtils.testJsFilePath.toNativePath(), 159 fileUtils.testJsFilePath.toNativePath(),
160 false, 160 false,
161 bootstrapDeps, 161 bootstrapDeps,
162 executable, 162 executable,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 cleanup(); 237 cleanup();
238 throw error; 238 throw error;
239 }).then((_) { 239 }).then((_) {
240 cleanup(); 240 cleanup();
241 }); 241 });
242 } 242 }
243 // We need to wait some time to make sure that the files we 'touch' get a 243 // We need to wait some time to make sure that the files we 'touch' get a
244 // bigger timestamp than the old ones 244 // bigger timestamp than the old ones
245 new Timer(new Duration(seconds: 1), touchFilesAndRunTests); 245 new Timer(new Duration(seconds: 1), touchFilesAndRunTests);
246 } 246 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_unauthorized_test.dart ('k') | tests/standalone/io/socket_cross_process_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698