Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: tools/testing/dart/test_runner.dart

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index dd857ea57bef1158f094d617f10dfbc407ec807b..caddb529b486cf200edf20fc93993e5711db83f7 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -254,7 +254,7 @@ class TestOutputImpl implements TestOutput {
bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result);
bool get hasCrashed() {
- if (new Platform().operatingSystem() == 'windows') {
+ if (Platform.operatingSystem() == 'windows') {
if (exitCode != 0) {
// Suppress some flaky errors that crash the VM.
// TODO(sigmund,efortuna): remove this when bug 2124 gets fixed.
@@ -292,7 +292,7 @@ class TestOutputImpl implements TestOutput {
bool get hasFailed() {
// TODO(efortuna): This is a total hack to keep our buildbots (more) green
// while the VM team solves Issue 2124. Remove when issue is fixed.
- if (new Platform().operatingSystem() == 'windows' && (exitCode == 253 ||
+ if (Platform.operatingSystem() == 'windows' && (exitCode == 253 ||
exitCode == 3)) {
for (String line in testCase.output.stdout) {
if (line.startsWith('VM exited with signal 1073741819') ||
@@ -620,7 +620,7 @@ class RunningProcess {
void runCommand(Command command,
void exitHandler(int exitCode)) {
- if (new Platform().operatingSystem() == 'windows') {
+ if (Platform.operatingSystem() == 'windows') {
// Windows can't handle the first command if it is a .bat file or the like
// with the slashes going the other direction.
// TODO(efortuna): Remove this when fixed (Issue 1306).
@@ -928,7 +928,7 @@ class ProcessQueue {
String globalTemporaryDirectory() {
if (_temporaryDirectory != null) return _temporaryDirectory;
- if (new Platform().operatingSystem() == 'windows') {
+ if (Platform.operatingSystem() == 'windows') {
throw new Exception(
'Test suite requires temporary directory. Not supported on Windows.');
}
@@ -981,7 +981,7 @@ class ProcessQueue {
* True if we are using a browser + platform combination that needs the
* Selenium server jar.
*/
- bool get _needsSelenium() => new Platform().operatingSystem() == 'macos' &&
+ bool get _needsSelenium() => Platform.operatingSystem() == 'macos' &&
browserUsed == 'safari';
/** True if the Selenium Server is ready to be used. */
@@ -1004,7 +1004,7 @@ class ProcessQueue {
// Check to see if the jar was already running before the program started.
String cmd = 'ps';
var arg = ['aux'];
- if (new Platform().operatingSystem() == 'windows') {
+ if (Platform.operatingSystem() == 'windows') {
cmd = 'tasklist';
arg.add('/v');
}
@@ -1064,7 +1064,7 @@ class ProcessQueue {
void _startSeleniumServer() {
// Get the absolute path to the Selenium jar.
String filePath = new Options().script;
- String pathSep = new Platform().pathSeparator();
+ String pathSep = Platform.pathSeparator();
int index = filePath.lastIndexOf(pathSep);
filePath = filePath.substring(0, index) + '${pathSep}testing${pathSep}';
var dir = new Directory(filePath);
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698