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

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

Issue 26162007: Remove unittest-based wrapping from our testing scripts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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_runner.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 ac6e72aabc454d035676c3b7969472c7fafb048a..8c8ffdf7848a6f2c7f6bde109018888b96dca1fe 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -711,8 +711,6 @@ class StandardTestSuite extends TestSuite {
// browser or otherwise).
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.
@@ -723,10 +721,9 @@ class StandardTestSuite extends TestSuite {
multiHtmlTestExpectations[fullTestName] =
testExpectations.expectations(fullTestName);
}
- enqueueBrowserTest(info, testName, multiHtmlTestExpectations,
- isWrappingRequired);
+ enqueueBrowserTest(info, testName, multiHtmlTestExpectations);
} else {
- enqueueBrowserTest(info, testName, expectations, isWrappingRequired);
+ enqueueBrowserTest(info, testName, expectations);
}
} else {
enqueueStandardTest(info, testName, expectations);
@@ -919,23 +916,13 @@ class StandardTestSuite extends TestSuite {
}
void _createWrapperFile(String dartWrapperFilename,
- Path dartLibraryFilename,
- {bool useUnittestWrapper: false}) {
+ Path dartLibraryFilename) {
File file = new File(dartWrapperFilename);
RandomAccessFile dartWrapper = file.openSync(mode: FileMode.WRITE);
var usePackageImport = dartLibraryFilename.segments().contains("pkg");
var libraryPathComponent = _createUrlPathFromFile(dartLibraryFilename);
- 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);
- }
-
+ var generatedSource = dartTestWrapper(libraryPathComponent);
dartWrapper.writeStringSync(generatedSource);
dartWrapper.closeSync();
}
@@ -955,13 +942,11 @@ class StandardTestSuite extends TestSuite {
*/
void enqueueBrowserTest(TestInformation info,
String testName,
- expectations,
- bool isWrappingRequired) {
+ expectations) {
// TODO(kustermann/ricow): This method should be refactored.
Map optionsFromFile = info.optionsFromFile;
Path filePath = info.filePath;
String filename = filePath.toString();
- bool isWebTest = optionsFromFile['containsDomImport'];
final String compiler = configuration['compiler'];
final String runtime = configuration['runtime'];
@@ -1037,15 +1022,9 @@ class StandardTestSuite extends TestSuite {
}
} else {
htmlPath = '$tempDir/test.html';
- if (isWrappingRequired && !isWebTest) {
+ if (configuration['compiler'] != 'dart2js') {
// test.dart will import the dart test.
- if (configuration['use_browser_controller'] &&
- configuration['runtime'] == 'dartium') {
- _createWrapperFile(dartWrapperFilename, filePath);
- } else {
- _createWrapperFile(
- dartWrapperFilename, filePath, useUnittestWrapper: true);
- }
+ _createWrapperFile(dartWrapperFilename, filePath);
} else {
dartWrapperFilename = filename;
}
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698