| Index: tools/testing/dart/test_runner.dart
|
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
|
| index 95228efe6cb3e36829671340f07ddb509e54dd0b..0fd67142837cd13bd6092b13972133e7c8533975 100644
|
| --- a/tools/testing/dart/test_runner.dart
|
| +++ b/tools/testing/dart/test_runner.dart
|
| @@ -17,8 +17,8 @@
|
| #import("test_progress.dart");
|
| #import("test_suite.dart");
|
|
|
| -final int NO_TIMEOUT = 0;
|
| -final int SLOW_TIMEOUT_MULTIPLIER = 4;
|
| +const int NO_TIMEOUT = 0;
|
| +const int SLOW_TIMEOUT_MULTIPLIER = 4;
|
|
|
| /** A command executed as a step in a test case. */
|
| class Command {
|
| @@ -316,7 +316,7 @@ class BrowserTestOutputImpl extends TestOutputImpl {
|
| line.contains('Failed to run command. return code=1')) {
|
| // If we get the X server error, or DRT crashes with a core dump, retry
|
| // the test.
|
| - if ((testCase as Dynamic).numRetries > 0) {
|
| + if ((testCase as BrowserTestCase).numRetries > 0) {
|
| requestRetry = true;
|
| }
|
| return true;
|
| @@ -551,16 +551,16 @@ class RunningProcess {
|
| }
|
| if (allowRetries && testCase.usesWebDriver
|
| && testCase.output.unexpectedOutput
|
| - && (testCase as Dynamic).numRetries > 0) {
|
| + && (testCase as BrowserTestCase).numRetries > 0) {
|
| // Selenium tests can be flaky. Try rerunning.
|
| testCase.output.requestRetry = true;
|
| }
|
| if (testCase.output.requestRetry) {
|
| testCase.output.requestRetry = false;
|
| this.timedOut = false;
|
| - (testCase as Dynamic).numRetries--;
|
| + (testCase as BrowserTestCase).numRetries--;
|
| print("Potential flake. Re-running ${testCase.displayName} "
|
| - "(${(testCase as Dynamic).numRetries} attempt(s) remains)");
|
| + "(${(testCase as BrowserTestCase).numRetries} attempt(s) remains)");
|
| this.start();
|
| } else {
|
| testCase.completed();
|
| @@ -1035,7 +1035,7 @@ class ProcessQueue {
|
| stdoutStringStream.onLine = () {
|
| var line = stdoutStringStream.readLine();
|
| while (null != line) {
|
| - if (const RegExp(@".*selenium-server-standalone.*").hasMatch(line)) {
|
| + if (const RegExp(r".*selenium-server-standalone.*").hasMatch(line)) {
|
| _seleniumAlreadyRunning = true;
|
| resumeTesting();
|
| }
|
| @@ -1068,8 +1068,8 @@ class ProcessQueue {
|
| if (source.closed) return; // TODO(whesse): Remove when bug is fixed.
|
| var line = source.readLine();
|
| while (null != line) {
|
| - if (const RegExp(@".*Started.*Server.*").hasMatch(line) ||
|
| - const RegExp(@"Exception.*Selenium is already running.*").hasMatch(
|
| + if (const RegExp(r".*Started.*Server.*").hasMatch(line) ||
|
| + const RegExp(r"Exception.*Selenium is already running.*").hasMatch(
|
| line)) {
|
| resumeTesting();
|
| }
|
| @@ -1090,7 +1090,7 @@ class ProcessQueue {
|
| filePath = '${filePath.substring(0, index)}${pathSep}testing${pathSep}';
|
| var lister = new Directory(filePath).list();
|
| lister.onFile = (String file) {
|
| - if (const RegExp(@"selenium-server-standalone-.*\.jar").hasMatch(file)
|
| + if (const RegExp(r"selenium-server-standalone-.*\.jar").hasMatch(file)
|
| && _seleniumServer == null) {
|
| _seleniumServer = Process.start('java', ['-jar', file]);
|
| _seleniumServer.onError = (e) {
|
|
|