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

Unified Diff: tests/lib/mirrors/null_test.dart

Issue 582753002: dart2js: add --preserve-uris flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update tests. Created 6 years, 2 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 | « tests/lib/mirrors/mirrors_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/null_test.dart
diff --git a/tests/lib/mirrors/null_test.dart b/tests/lib/mirrors/null_test.dart
index 72f5e23c7fbef2778e3cba073075ef25a8082aa6..2b6407b2a20fc307ad1b6ec6cba11cdb5b1add57 100644
--- a/tests/lib/mirrors/null_test.dart
+++ b/tests/lib/mirrors/null_test.dart
@@ -31,6 +31,16 @@ main() {
Expect.equals(#Object, NullMirror.superclass.simpleName);
Expect.equals(null, NullMirror.superclass.superclass);
Expect.listEquals([], NullMirror.superinterfaces);
- Expect.equals(currentMirrorSystem().libraries[Uri.parse('dart:core')],
- NullMirror.owner);
+ Map<Uri, LibraryMirror> libraries = currentMirrorSystem().libraries;
+ LibraryMirror coreLibrary = libraries[Uri.parse('dart:core')];
+ if (coreLibrary == null) {
+ // In minified mode we don't preserve the URIs.
+ coreLibrary = libraries.values
+ .firstWhere((LibraryMirror lm) => lm.simpleName == #dart.core);
+ Uri uri = coreLibrary.uri;
+ Expect.equals("https", uri.scheme);
+ Expect.equals("dartlang.org", uri.host);
+ Expect.equals("/dart2js-stripped-uri", uri.path);
+ }
+ Expect.equals(coreLibrary, NullMirror.owner);
}
« no previous file with comments | « tests/lib/mirrors/mirrors_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698