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: tools/testing/dart/test_suite.dart

Issue 219053003: Deprecate automatic generation of precompiled.js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 323c8fcbe2683e398ecf1f171e3d8d7a5a3e85f2..4f0519ff7fdc352e10c4cfdd8f43e2c898b95736 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -356,10 +356,12 @@ abstract class TestSuite {
String createCompilationOutputDirectory(Path testPath) {
var checked = configuration['checked'] ? '-checked' : '';
var minified = configuration['minified'] ? '-minified' : '';
+ var csp = configuration['csp'] ? '-csp' : '';
var sdk = configuration['use_sdk'] ? '-sdk' : '';
var packages = configuration['use_public_packages']
? '-public_packages' : '';
- var dirName = "${configuration['compiler']}$checked$minified$packages$sdk";
+ var dirName = "${configuration['compiler']}"
+ "$checked$minified$csp$packages$sdk";
return createGeneratedTestDirectoryHelper(
"compilations", dirName, testPath, "");
}
@@ -1151,8 +1153,6 @@ class StandardTestSuite extends TestSuite {
String dartWrapperFilename = '$tempDir/test.dart';
String compiledDartWrapperFilename = '$compilationTempDir/test.js';
- String precompiledDartWrapperFilename =
- '$compilationTempDir/test.precompiled.js';
String content = null;
Path dir = filePath.directoryPath;
@@ -1201,9 +1201,6 @@ class StandardTestSuite extends TestSuite {
} else {
compiledDartWrapperFilename = '$tempDir/$nameNoExt.js';
var jsFile = '$nameNoExt.js';
- if (configuration['csp']) {
- jsFile = '$nameNoExt.precompiled.js';
- }
htmlContents = htmlContents.replaceAll('%TEST_SCRIPTS%',
'<script src="$jsFile"></script>');
}
@@ -1225,9 +1222,6 @@ class StandardTestSuite extends TestSuite {
String scriptPath = dartWrapperFilename;
if (compiler != 'none') {
scriptPath = compiledDartWrapperFilename;
- if (configuration['csp']) {
- scriptPath = precompiledDartWrapperFilename;
- }
}
scriptPath = _createUrlPathFromFile(new Path(scriptPath));
@@ -1335,6 +1329,7 @@ class StandardTestSuite extends TestSuite {
args.add(packageRoot);
}
args.add('--out=$outputFile');
+ if (configuration['csp']) args.add('--csp');
args.add(inputFile);
args.addAll(optionsFromFile['sharedOptions']);
if (executable.endsWith('.dart')) {

Powered by Google App Engine
This is Rietveld 408576698