| 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:convert" show LineSplitter, UTF8, JSON; | 7 import "dart:convert" show LineSplitter, UTF8, JSON; |
| 8 import "dart:core"; | 8 import "dart:core"; |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 import "dart:math" show max, min; | 10 import "dart:math" show max, min; |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 }; | 760 }; |
| 761 var args = [ | 761 var args = [ |
| 762 "-profile", | 762 "-profile", |
| 763 "${userDir.path}", | 763 "${userDir.path}", |
| 764 "-no-remote", | 764 "-no-remote", |
| 765 "-new-instance", | 765 "-new-instance", |
| 766 url | 766 url |
| 767 ]; | 767 ]; |
| 768 var environment = new Map<String, String>.from(Platform.environment); | 768 var environment = new Map<String, String>.from(Platform.environment); |
| 769 environment["MOZ_CRASHREPORTER_DISABLE"] = "1"; | 769 environment["MOZ_CRASHREPORTER_DISABLE"] = "1"; |
| 770 // TODO(26060): Remove delay when dart2js stops hanging under load. | 770 return startBrowserProcess(_binary, args, environment: environment); |
| 771 return new Future.delayed(new Duration(seconds: 10)).then((_) { | |
| 772 return startBrowserProcess(_binary, args, environment: environment); | |
| 773 }); | |
| 774 }); | 771 }); |
| 775 }).catchError((e) { | 772 }).catchError((e) { |
| 776 _logEvent("Running $_binary --version failed with $e"); | 773 _logEvent("Running $_binary --version failed with $e"); |
| 777 return false; | 774 return false; |
| 778 }); | 775 }); |
| 779 } | 776 } |
| 780 | 777 |
| 781 String toString() => "Firefox"; | 778 String toString() => "Firefox"; |
| 782 } | 779 } |
| 783 | 780 |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 </div> | 1782 </div> |
| 1786 <div id="embedded_iframe_div" class="test box"> | 1783 <div id="embedded_iframe_div" class="test box"> |
| 1787 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe> | 1784 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe> |
| 1788 </div> | 1785 </div> |
| 1789 </body> | 1786 </body> |
| 1790 </html> | 1787 </html> |
| 1791 """; | 1788 """; |
| 1792 return driverContent; | 1789 return driverContent; |
| 1793 } | 1790 } |
| 1794 } | 1791 } |
| OLD | NEW |