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

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

Issue 25514002: Implement testing support for "--compiler=none --runtime=dartium" (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 | « tools/testing/dart/test_options.dart ('k') | 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 e98f6f1386b3cf1938fe5cc5a4efd5510d807768..64a495f359a14c1743243c8e67f9af61a0b46114 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -712,6 +712,7 @@ class StandardTestSuite extends TestSuite {
enqueueStandardTest(info, testName, expectations);
} else if (TestUtils.isBrowserRuntime(configuration['runtime'])) {
bool isWrappingRequired = configuration['compiler'] != 'dart2js';
+
if (info.optionsFromFile['isMultiHtmlTest']) {
// A browser multi-test has multiple expectations for one test file.
// Find all the different sub-test expecations for one entire test file.
@@ -917,14 +918,25 @@ class StandardTestSuite extends TestSuite {
return url;
}
- void _createWrapperFile(String dartWrapperFilename, dartLibraryFilename) {
+ void _createWrapperFile(String dartWrapperFilename,
+ Path dartLibraryFilename,
+ {bool useUnittestWrapper: false}) {
File file = new File(dartWrapperFilename);
RandomAccessFile dartWrapper = file.openSync(mode: FileMode.WRITE);
var usePackageImport = dartLibraryFilename.segments().contains("pkg");
var libraryPathComponent = _createUrlPathFromFile(dartLibraryFilename);
- dartWrapper.writeStringSync(dartTestWrapper(usePackageImport,
- libraryPathComponent));
+ var generatedSource;
+ if (useUnittestWrapper) {
+ // FIXME(kustermann): This is broken, we can't do unittest-based wrapping
+ // of tests (e.g. async operations are not wrapped in expectAsync()).
+ generatedSource = dartUnittestWrapper(usePackageImport,
+ libraryPathComponent);
+ } else {
+ generatedSource = dartTestWrapper(libraryPathComponent);
+ }
+
+ dartWrapper.writeStringSync(generatedSource);
dartWrapper.closeSync();
}
@@ -987,7 +999,6 @@ class StandardTestSuite extends TestSuite {
// Use existing HTML document if available.
String htmlPath;
if (customHtml.existsSync()) {
-
// If necessary, run the Polymer deploy steps.
// TODO(jmesserly): this should be generalized for any tests that
// require Pub deploy, not just polymer.
@@ -1028,7 +1039,13 @@ class StandardTestSuite extends TestSuite {
htmlPath = '$tempDir/test.html';
if (isWrappingRequired && !isWebTest) {
// test.dart will import the dart test.
- _createWrapperFile(dartWrapperFilename, filePath);
+ if (configuration['use_browser_controller'] &&
+ configuration['runtime'] == 'dartium') {
+ _createWrapperFile(dartWrapperFilename, filePath);
+ } else {
+ _createWrapperFile(
ricow1 2013/10/02 18:17:47 is this basically drt now?
kustermann 2013/10/03 11:06:02 Yes it is -- or rather content_shell. I'll remove
+ dartWrapperFilename, filePath, useUnittestWrapper: true);
+ }
} else {
dartWrapperFilename = filename;
}
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698