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

Unified Diff: tools/testing/dart/test_suite.dart

Issue 24427005: test.py: Use *.precompiled.js in csp mode for customHtml tests as well (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 85a93c964d8b5c8a6a0d0d523925e968ccdf3434..c0bf48f1a5711c18fb44f1e70da8546dbf7c37a7 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1014,9 +1014,13 @@ class StandardTestSuite extends TestSuite {
'<script type="text/javascript" '
'src="/packages/browser/dart.js"></script>');
} else {
- htmlContents = htmlContents.replaceAll('%TEST_SCRIPTS%',
- '<script src="$nameNoExt.js"></script>');
compiledDartWrapperFilename = '$tempDir/$nameNoExt.js';
+ var jsFile = '$nameNoExt.js';
+ if (configuration['csp']) {
+ jsFile = '$nameNoExt.precompiled.js';
+ }
+ htmlContents = htmlContents.replaceAll('%TEST_SCRIPTS%',
+ '<script src="$jsFile"></script>');
}
new File(htmlPath).writeAsStringSync(htmlContents);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698