| 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 library browser; | 4 library browser; |
| 5 | 5 |
| 6 import "dart:async"; | 6 import "dart:async"; |
| 7 import "dart:core"; | 7 import "dart:core"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 | 9 |
| 10 import 'android.dart'; | 10 import 'android.dart'; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 * We get the safari version by parsing a version file | 182 * We get the safari version by parsing a version file |
| 183 */ | 183 */ |
| 184 const String versionFile = "/Applications/Safari.app/Contents/version.plist"; | 184 const String versionFile = "/Applications/Safari.app/Contents/version.plist"; |
| 185 | 185 |
| 186 /** | 186 /** |
| 187 * Directories where safari stores state. We delete these if the deleteCache | 187 * Directories where safari stores state. We delete these if the deleteCache |
| 188 * is set | 188 * is set |
| 189 */ | 189 */ |
| 190 static const List<String> CACHE_DIRECTORIES = | 190 static const List<String> CACHE_DIRECTORIES = |
| 191 const ["Library/Caches/com.apple.Safari", | 191 const ["Library/Caches/com.apple.Safari", |
| 192 "Library/Safari"]; | 192 "Library/Safari", |
| 193 "Library/Saved Application State/com.apple.Safari.savedState", |
| 194 "Library/Caches/Metadata/Safari"]; |
| 193 | 195 |
| 194 | 196 |
| 195 Future<bool> allowPopUps() { | 197 Future<bool> allowPopUps() { |
| 196 var command = "defaults"; | 198 var command = "defaults"; |
| 197 var args = ["write", "com.apple.safari", | 199 var args = ["write", "com.apple.safari", |
| 198 "com.apple.Safari.ContentPageGroupIdentifier." | 200 "com.apple.Safari.ContentPageGroupIdentifier." |
| 199 "WebKit2JavaScriptCanOpenWindowsAutomatically", | 201 "WebKit2JavaScriptCanOpenWindowsAutomatically", |
| 200 "1"]; | 202 "1"]; |
| 201 return Process.run(command, args).then((result) { | 203 return Process.run(command, args).then((result) { |
| 202 if (result.exitCode != 0) { | 204 if (result.exitCode != 0) { |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 </head> | 1055 </head> |
| 1054 <body onload="startTesting()"> | 1056 <body onload="startTesting()"> |
| 1055 Dart test driver, number of tests: <div id="number"></div> | 1057 Dart test driver, number of tests: <div id="number"></div> |
| 1056 <iframe id="embedded_iframe"></iframe> | 1058 <iframe id="embedded_iframe"></iframe> |
| 1057 </body> | 1059 </body> |
| 1058 </html> | 1060 </html> |
| 1059 """; | 1061 """; |
| 1060 return driverContent; | 1062 return driverContent; |
| 1061 } | 1063 } |
| 1062 } | 1064 } |
| OLD | NEW |