Chromium Code Reviews| Index: tools/testing/dart/test_suite.dart |
| =================================================================== |
| --- tools/testing/dart/test_suite.dart (revision 4199) |
| +++ tools/testing/dart/test_suite.dart (working copy) |
| @@ -200,6 +200,11 @@ |
| List<TestInformation> cachedTests; |
| final String dartDir; |
| Function globalTemporaryDirectory; |
| + /** |
| + * Reference to our test queue, so that we can notify the queue if it needs |
| + * to run any cleanup after the suite completes. |
| + */ |
| + ProcessQueue _allDoneCallbackListener; |
| StandardTestSuite(Map this.configuration, |
| String this.suiteName, |
| @@ -564,10 +569,22 @@ |
| completeHandler, |
| expectations, |
| optionsFromFile['isNegative']); |
| + if ((_allDoneCallbackListener != null)) { |
|
Jennifer Messerly
2012/02/14 02:17:25
extra parens
Emily Fortuna
2012/02/14 23:55:44
Done.
|
| + _allDoneCallbackListener.browserUsed = configuration['browser']; |
| + } |
| doTest(testCase); |
| } |
| } |
| + /** |
| + * Notify the process queue that once all the tests have completed, we need |
| + * to run a process to clean up any bad state that WebDriver may have left |
| + * (extra browser processes, etc). |
| + */ |
| + void notifyIfBrowserCleanupNeeded(ProcessQueue queue) { |
| + _allDoneCallbackListener = queue; |
| + } |
| + |
| bool get requiresCleanTemporaryDirectory() => |
| configuration['component'] == 'dartc' || |
| configuration['component'] == 'chromium'; |