OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:convert'; | 5 import 'dart:convert'; |
6 // We need to use the 'io' prefix here, otherwise io.exitCode will shadow | 6 // We need to use the 'io' prefix here, otherwise io.exitCode will shadow |
7 // CommandOutput.exitCode in subclasses of CommandOutput. | 7 // CommandOutput.exitCode in subclasses of CommandOutput. |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 | 9 |
10 import 'browser_controller.dart'; | 10 import 'browser_controller.dart'; |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 505 |
506 BrowserCommandOutputImpl._internal(Command command, BrowserTestOutput result, | 506 BrowserCommandOutputImpl._internal(Command command, BrowserTestOutput result, |
507 this._rawOutcome, List<int> stdout, List<int> stderr) | 507 this._rawOutcome, List<int> stdout, List<int> stderr) |
508 : super(command, 0, result.didTimeout, stdout, stderr, result.duration, | 508 : super(command, 0, result.didTimeout, stdout, stderr, result.duration, |
509 false, 0) { | 509 false, 0) { |
510 _result = result; | 510 _result = result; |
511 } | 511 } |
512 | 512 |
513 Expectation result(TestCase testCase) { | 513 Expectation result(TestCase testCase) { |
514 // Handle timeouts first | 514 // Handle timeouts first |
515 if (_result.didTimeout) return Expectation.timeout; | |
516 if (_result.didTimeout) { | 515 if (_result.didTimeout) { |
517 if (testCase.configuration.runtime == Runtime.ie11) { | 516 if (testCase.configuration.runtime == Runtime.ie11) { |
518 // TODO(28955): See http://dartbug.com/28955 | 517 // TODO(28955): See http://dartbug.com/28955 |
519 DebugLogger.warning("Timeout of ie11 on test ${testCase.displayName}"); | 518 DebugLogger.warning("Timeout of ie11 on test ${testCase.displayName}"); |
520 return Expectation.ignore; | 519 return Expectation.ignore; |
521 } | 520 } |
522 return Expectation.timeout; | 521 return Expectation.timeout; |
523 } | 522 } |
524 | 523 |
525 if (hasNonUtf8) return Expectation.nonUtf8Error; | 524 if (hasNonUtf8) return Expectation.nonUtf8Error; |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 // complete successfully, it's outcome is Expectation.FAIL. | 900 // complete successfully, it's outcome is Expectation.FAIL. |
902 // TODO: maybe we should introduce a AsyncIncomplete marker or so | 901 // TODO: maybe we should introduce a AsyncIncomplete marker or so |
903 if (outcome == Expectation.pass) { | 902 if (outcome == Expectation.pass) { |
904 if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) { | 903 if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) { |
905 return Expectation.fail; | 904 return Expectation.fail; |
906 } | 905 } |
907 } | 906 } |
908 return outcome; | 907 return outcome; |
909 } | 908 } |
910 } | 909 } |
OLD | NEW |