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; |
} |