| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 : super(displayName, commands, configuration, completedHandler, | 387 : super(displayName, commands, configuration, completedHandler, |
| 388 expectedOutcomes, isNegative: isNegative, info: info) { | 388 expectedOutcomes, isNegative: isNegative, info: info) { |
| 389 numRetries = 2; // Allow two retries to compensate for flaky browser tests. | 389 numRetries = 2; // Allow two retries to compensate for flaky browser tests. |
| 390 observers = []; | 390 observers = []; |
| 391 } | 391 } |
| 392 | 392 |
| 393 List<String> get _lastArguments => commands.last.arguments; | 393 List<String> get _lastArguments => commands.last.arguments; |
| 394 | 394 |
| 395 List<String> get batchRunnerArguments => [_lastArguments[0], '--batch']; | 395 List<String> get batchRunnerArguments => [_lastArguments[0], '--batch']; |
| 396 | 396 |
| 397 List<String> get batchTestArguments => | 397 List<String> get batchTestArguments => _lastArguments.sublist(1); |
| 398 _lastArguments.getRange(1, _lastArguments.length - 1); | |
| 399 | 398 |
| 400 /** Add a test case to listen for when this current test has completed. */ | 399 /** Add a test case to listen for when this current test has completed. */ |
| 401 void addObserver(BrowserTestCase testCase) { | 400 void addObserver(BrowserTestCase testCase) { |
| 402 observers.add(testCase); | 401 observers.add(testCase); |
| 403 } | 402 } |
| 404 | 403 |
| 405 /** | 404 /** |
| 406 * Notify all of the test cases that are dependent on this one that they can | 405 * Notify all of the test cases that are dependent on this one that they can |
| 407 * proceed. | 406 * proceed. |
| 408 */ | 407 */ |
| (...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 } | 1722 } |
| 1724 } | 1723 } |
| 1725 | 1724 |
| 1726 void eventAllTestsDone() { | 1725 void eventAllTestsDone() { |
| 1727 for (var listener in _eventListener) { | 1726 for (var listener in _eventListener) { |
| 1728 listener.allDone(); | 1727 listener.allDone(); |
| 1729 } | 1728 } |
| 1730 } | 1729 } |
| 1731 } | 1730 } |
| 1732 | 1731 |
| OLD | NEW |