Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: tests/compiler/dart2js/deferred_custom_element_test.dart

Issue 1235563003: Add interfaces for a new compiler API. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/deferred_custom_element_test.dart
diff --git a/tests/compiler/dart2js/deferred_custom_element_test.dart b/tests/compiler/dart2js/deferred_custom_element_test.dart
index 9cbf87fa14dab133841797795608978055f7ef14..1fa5d120cb4d66040a144d9c31afbd97aff01d7b 100644
--- a/tests/compiler/dart2js/deferred_custom_element_test.dart
+++ b/tests/compiler/dart2js/deferred_custom_element_test.dart
@@ -6,32 +6,13 @@
// to determine which elements can be deferred and which libraries
// much be included in the initial download (loaded eagerly).
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/dart2jslib.dart';
import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
-import 'memory_source_file_helper.dart';
-import "dart:async";
-
-class FakeOutputStream<T> extends EventSink<T> {
- void add(T event) {}
- void addError(T event, [StackTrace stackTrace]) {}
- void close() {}
-}
+import 'memory_compiler.dart';
void main() {
- Uri script = currentDirectory.resolveUri(Platform.script);
- Uri libraryRoot = script.resolve('../../../sdk/');
- Uri packageRoot = script.resolve('./packages/');
-
- var provider = new MemorySourceFileProvider(MEMORY_SOURCE_FILES);
- var handler = new FormattingDiagnosticHandler(provider);
-
- Compiler compiler = new Compiler(provider.readStringFromUri,
- (name, extension) => new FakeOutputStream(),
- handler.diagnosticHandler,
- libraryRoot,
- packageRoot,
- [],
- {});
+ Compiler compiler = compilerFor(MEMORY_SOURCE_FILES);
asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
var mainOutputUnit = compiler.deferredLoadTask.mainOutputUnit;
« no previous file with comments | « tests/compiler/dart2js/codegen_helper.dart ('k') | tests/compiler/dart2js/deferred_dont_inline_deferred_constants_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698