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

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

Issue 321293002: Censor dart:_blink and dart:builtin from the enumeration of libraries in the isolate and from impor… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « runtime/lib/mirrors.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/mirrors_reader_test.dart
diff --git a/tests/lib/mirrors/mirrors_reader_test.dart b/tests/lib/mirrors/mirrors_reader_test.dart
index 1c69b07928ee73cbf9522572ed53de231b1c20ee..e66c5f0db869cec3ac5ef510aad7dc666e5f5712 100644
--- a/tests/lib/mirrors/mirrors_reader_test.dart
+++ b/tests/lib/mirrors/mirrors_reader_test.dart
@@ -7,16 +7,29 @@
library test.mirrors.reader;
import 'dart:mirrors';
+import 'package:expect/expect.dart';
import 'mirrors_reader.dart';
class RuntimeMirrorsReader extends MirrorsReader {
+ final MirrorSystem mirrorSystem;
final String mirrorSystemType;
RuntimeMirrorsReader(MirrorSystem mirrorSystem,
{bool verbose: false, bool includeStackTrace: false})
- : this.mirrorSystemType = '${mirrorSystem.runtimeType}',
+ : this.mirrorSystem = mirrorSystem,
+ this.mirrorSystemType = '${mirrorSystem.runtimeType}',
super(verbose: verbose, includeStackTrace: includeStackTrace);
+ visitLibraryMirror(LibraryMirror mirror) {
+ super.visitLibraryMirror(mirror);
+ Expect.equals(mirror, mirrorSystem.libraries[mirror.uri]);
+ }
+
+ visitClassMirror(ClassMirror mirror) {
+ super.visitClassMirror(mirror);
+ Expect.isNotNull(mirror.owner);
+ }
+
bool allowUnsupported(var receiver, String tag, UnsupportedError exception) {
if (mirrorSystemType == '_LocalMirrorSystem') {
// VM mirror system.
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698