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:async'; | 5 import 'dart:async'; |
6 import 'dart:convert'; | 6 import 'dart:convert'; |
7 import 'dart:core'; | 7 import 'dart:core'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:math'; | 9 import 'dart:math'; |
10 | 10 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 }; | 498 }; |
499 var args = [ | 499 var args = [ |
500 "--user-data-dir=${userDir.path}", | 500 "--user-data-dir=${userDir.path}", |
501 url, | 501 url, |
502 "--disable-extensions", | 502 "--disable-extensions", |
503 "--disable-popup-blocking", | 503 "--disable-popup-blocking", |
504 "--bwsi", | 504 "--bwsi", |
505 "--no-first-run", | 505 "--no-first-run", |
506 ]; | 506 ]; |
507 | 507 |
508 // TODO(rnystrom): If you want Chrome to spawn with the dev tools tab | 508 // TODO(rnystrom): Uncomment this to open the dev tools tab when Chrome |
509 // open, which is handy for debugging, add: | 509 // is spawned. Handy for debugging tests. |
510 // | 510 // args.add("--auto-open-devtools-for-tabs"); |
511 // --auto-open-devtools-for-tabs | |
512 | 511 |
513 return startBrowserProcess(_binary, args, | 512 return startBrowserProcess(_binary, args, |
514 environment: _getEnvironment()); | 513 environment: _getEnvironment()); |
515 }); | 514 }); |
516 }).catchError((e) { | 515 }).catchError((e) { |
517 _logEvent("Running $_binary --version failed with $e"); | 516 _logEvent("Running $_binary --version failed with $e"); |
518 return false; | 517 return false; |
519 }); | 518 }); |
520 } | 519 } |
521 | 520 |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 'exit code: ${result.exitCode}\n' | 1945 'exit code: ${result.exitCode}\n' |
1947 'stdout: ${result.stdout}\n' | 1946 'stdout: ${result.stdout}\n' |
1948 'stderr: ${result.stderr}'); | 1947 'stderr: ${result.stderr}'); |
1949 } else { | 1948 } else { |
1950 print('[$message] Successfully uploaded screenshot to $storageUrl'); | 1949 print('[$message] Successfully uploaded screenshot to $storageUrl'); |
1951 } | 1950 } |
1952 new File(screenshotFile).deleteSync(); | 1951 new File(screenshotFile).deleteSync(); |
1953 } | 1952 } |
1954 print('--------------------------------------------------------------------'); | 1953 print('--------------------------------------------------------------------'); |
1955 } | 1954 } |
OLD | NEW |