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

Unified Diff: tests/compiler/dart2js/serialization/helper.dart

Issue 2150533002: Serialize data for LibraryElement.getImportsFor (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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/serialization/helper.dart
diff --git a/tests/compiler/dart2js/serialization/helper.dart b/tests/compiler/dart2js/serialization/helper.dart
index e5fab486dbe477004c5b2b49bc99dddef7167b70..b6d77e7191ce09e6699a9235840fe6ebb8a70776 100644
--- a/tests/compiler/dart2js/serialization/helper.dart
+++ b/tests/compiler/dart2js/serialization/helper.dart
@@ -153,16 +153,15 @@ Future<SerializationResult> serialize(Uri entryPoint,
if (dataUri == null) {
dataUri = Uri.parse('memory:${DEFAULT_DATA_FILE_NAME}');
}
+ OutputCollector outputCollector = new OutputCollector();
Compiler compiler = compilerFor(
- options: [Flags.analyzeAll],
+ options: [Flags.resolveOnly],
memorySourceFiles: memorySourceFiles,
- resolutionInputs: resolutionInputs);
- compiler.serialization.supportSerialization = true;
+ resolutionInputs: resolutionInputs,
+ outputProvider: outputCollector);
await compiler.run(entryPoint);
- BufferedEventSink sink = new BufferedEventSink();
- compiler.serialization.serializeToSink(
- sink, compiler.libraryLoader.libraries);
- SerializedData serializedData = new SerializedData(dataUri, sink.text);
+ SerializedData serializedData = new SerializedData(
+ dataUri, outputCollector.getOutput('', 'data'));
return new SerializationResult(compiler, serializedData);
}

Powered by Google App Engine
This is Rietveld 408576698