OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library test.runner.browser.dartium; | 5 library test.runner.browser.dartium; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return Platform.isWindows ? "dartium.exe" : "dartium"; | 89 return Platform.isWindows ? "dartium.exe" : "dartium"; |
90 } | 90 } |
91 | 91 |
92 String _executableInEditor() { | 92 String _executableInEditor() { |
93 var dir = p.dirname(sdkDir); | 93 var dir = p.dirname(sdkDir); |
94 | 94 |
95 if (Platform.isWindows) { | 95 if (Platform.isWindows) { |
96 if (!new File(p.join(dir, "DartEditor.exe")).existsSync()) return null; | 96 if (!new File(p.join(dir, "DartEditor.exe")).existsSync()) return null; |
97 | 97 |
98 var dartium = p.join(dir, "chromium\\chrome.exe"); | 98 var dartium = p.join(dir, "chromium\\chrome.exe"); |
99 return new File(dartium).existsSync() ? null : dartium; | 99 return new File(dartium).existsSync() ? dartium : null; |
100 } | 100 } |
101 | 101 |
102 if (Platform.isMacOS) { | 102 if (Platform.isMacOS) { |
103 if (!new File(p.join(dir, "DartEditor.app/Contents/MacOS/DartEditor")) | 103 if (!new File(p.join(dir, "DartEditor.app/Contents/MacOS/DartEditor")) |
104 .existsSync()) { | 104 .existsSync()) { |
105 return null; | 105 return null; |
106 } | 106 } |
107 | 107 |
108 var dartium = p.join( | 108 var dartium = p.join( |
109 dir, "chromium/Chromium.app/Contents/MacOs/Chromium"); | 109 dir, "chromium/Chromium.app/Contents/MacOS/Chromium"); |
110 return new File(dartium).existsSync() ? null : dartium; | 110 return new File(dartium).existsSync() ? dartium : null; |
111 } | 111 } |
112 | 112 |
113 assert(Platform.isLinux); | 113 assert(Platform.isLinux); |
114 if (!new File(p.join(dir, "DartEditor")).existsSync()) return null; | 114 if (!new File(p.join(dir, "DartEditor")).existsSync()) return null; |
115 | 115 |
116 var dartium = p.join(dir, "chromium", "chrome"); | 116 var dartium = p.join(dir, "chromium", "chrome"); |
117 return new File(dartium).existsSync() ? null : dartium; | 117 return new File(dartium).existsSync() ? dartium : null; |
118 } | 118 } |
119 } | 119 } |
OLD | NEW |