| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library test.dart2js_helper; | 5 library test.dart2js_helper; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:compiler/compiler.dart'; | 10 import 'package:compiler/compiler.dart'; |
| 11 import 'package:expect/expect.dart'; | 11 import 'package:expect/expect.dart'; |
| 12 import 'package:file/file.dart'; | 12 import 'package:file/file.dart'; |
| 13 | 13 |
| 14 final mainScriptUri = new Uri( | 14 final mainScriptUri = new Uri( |
| 15 scheme: "org.dartlang.fletch", | 15 scheme: "org.dartlang.dartino", |
| 16 path: "/main.dart"); | 16 path: "/main.dart"); |
| 17 | 17 |
| 18 void run(Uri uri, String mainScript, bool isServer) { | 18 void run(Uri uri, String mainScript, bool isServer) { |
| 19 | 19 |
| 20 void diagnosticHandler( | 20 void diagnosticHandler( |
| 21 Uri uri, int begin, int end, String message, Diagnostic kind) { | 21 Uri uri, int begin, int end, String message, Diagnostic kind) { |
| 22 } | 22 } |
| 23 | 23 |
| 24 Future compilerInputProvider(Uri uri) { | 24 Future compilerInputProvider(Uri uri) { |
| 25 if (uri == mainScriptUri) { | 25 if (uri == mainScriptUri) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }); | 63 }); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void compileUri(Uri uri, {bool isServer : false}) { | 66 void compileUri(Uri uri, {bool isServer : false}) { |
| 67 run(uri, null, isServer); | 67 run(uri, null, isServer); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void compileScript(String script, {bool isServer : false}) { | 70 void compileScript(String script, {bool isServer : false}) { |
| 71 run(mainScriptUri, script, isServer); | 71 run(mainScriptUri, script, isServer); |
| 72 } | 72 } |
| OLD | NEW |