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

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

Issue 10824347: Make top-level patch injections be compilation unit under library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Offline discussed changes. Created 8 years, 4 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
« no previous file with comments | « lib/compiler/implementation/scanner/scanner_task.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/patch_test.dart
diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index 9bb6b960386590d6c759f9160df89ea00014dc58..5ac187ecfbb5dc788aa2fcf05d691d66bd8e4f17 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -13,14 +13,10 @@
Compiler applyPatch(String script, String patch) {
String core = "$DEFAULT_CORELIB\n$script";
MockCompiler compiler = new MockCompiler(coreSource: core);
-
var uri = new Uri("core.dartp");
- var patchScript = new Script(uri, new MockFile(patch));
- var patchLibrary = new LibraryElement(patchScript);
-
- compiler.patchParser.scanLibraryElements(patchLibrary);
- compiler.applyLibraryPatch(compiler.coreLibrary, patchLibrary);
-
+ compiler.sourceFiles[uri.toString()] = new MockFile(patch);
+ compiler.patchParser.patchLibrary(uri, compiler.coreLibrary);
+ compiler.applyClassPatches(compiler.coreLibrary);
return compiler;
}
« no previous file with comments | « lib/compiler/implementation/scanner/scanner_task.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698