| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:io"; | 5 import "dart:io"; |
| 6 import "dart:isolate"; | 6 import "dart:isolate"; |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import "dart:utf"; | 8 import "dart:utf"; |
| 9 import "../../../tools/testing/dart/test_runner.dart"; | 9 import "../../../tools/testing/dart/test_runner.dart"; |
| 10 import "../../../tools/testing/dart/test_suite.dart"; | 10 import "../../../tools/testing/dart/test_suite.dart"; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 return new TestCase(name, | 95 return new TestCase(name, |
| 96 [command], | 96 [command], |
| 97 configuration, | 97 configuration, |
| 98 new Set<String>.from(expectations)); | 98 new Set<String>.from(expectations)); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 void testProcessQueue() { | 102 void testProcessQueue() { |
| 103 var maxProcesses = 2; | 103 var maxProcesses = 2; |
| 104 var maxBrowserProcesses = maxProcesses; | 104 var maxBrowserProcesses = maxProcesses; |
| 105 new ProcessQueue({}, maxProcesses, maxBrowserProcesses, | 105 new ProcessQueue({'noBatch' : true}, maxProcesses, maxBrowserProcesses, |
| 106 new DateTime.now(), [new CustomTestSuite()], | 106 new DateTime.now(), [new CustomTestSuite()], |
| 107 [new EventListener()], TestController.finished); | 107 [new EventListener()], TestController.finished); |
| 108 } | 108 } |
| 109 | 109 |
| 110 class EventListener extends progress.EventListener{ | 110 class EventListener extends progress.EventListener{ |
| 111 void done(TestCase test) { | 111 void done(TestCase test) { |
| 112 TestController.processCompletedTest(test); | 112 TestController.processCompletedTest(test); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 130 break; | 130 break; |
| 131 case 'timeout': | 131 case 'timeout': |
| 132 // Run for 10 seconds, then exit. This tests a 2 second timeout. | 132 // Run for 10 seconds, then exit. This tests a 2 second timeout. |
| 133 new Timer(new Duration(seconds: 10), (){ }); | 133 new Timer(new Duration(seconds: 10), (){ }); |
| 134 break; | 134 break; |
| 135 default: | 135 default: |
| 136 throw "Unknown option ${arguments[0]} passed to test_runner_test"; | 136 throw "Unknown option ${arguments[0]} passed to test_runner_test"; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 } | 139 } |
| OLD | NEW |