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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1231603008: Expose allocation tracing over service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index f47f1cd45e9bfbf3778be5e9a793482a222146cf..728902cd9ae4a1e763a2567009fb9ec774fd9aa2 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -196,6 +196,18 @@ Future<Isolate> resumeIsolate(Isolate isolate) {
}
+Future<Class> getRootClass(Isolate isolate, String className) async {
turnidge 2015/07/13 23:37:49 Maybe getClassFromRootLib since I don't know what
Cutch 2015/07/14 15:53:47 Done.
+ Library rootLib = await isolate.rootLibrary.load();
+ for (var i = 0; i < rootLib.classes.length; i++) {
+ Class cls = rootLib.classes[i];
+ if (cls.name == className) {
+ return cls;
+ }
+ }
+ return null;
+}
+
+
/// Runs [tests] in sequence, each of which should take an [Isolate] and
/// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether

Powered by Google App Engine
This is Rietveld 408576698