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

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

Issue 1361423004: Don't use a special var descriptor for :async_op since it can now be either stack or context alloca… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: also assert async op is either closure or null Created 5 years, 3 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 fa453df163b618b13e2626caaab1aec650633e94..6248b43ffafac9a629a77b36f186c5251b118059 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -249,12 +249,20 @@ IsolateTest stoppedAtLine(int line) {
ServiceMap stack = await isolate.getStack();
expect(stack.type, equals('Stack'));
- expect(stack['frames'].length, greaterThanOrEqualTo(1));
- Frame top = stack['frames'][0];
- print("We are at $top");
+ List<Frame> frames = stack['frames'];
+ expect(frames.length, greaterThanOrEqualTo(1));
+
+ Frame top = frames[0];
Script script = await top.location.script.load();
- expect(script.tokenToLine(top.location.tokenPos), equals(line));
+ if (script.tokenToLine(top.location.tokenPos) != line) {
+ var sb = new StringBuffer();
+ sb.write("Expected to be at line $line, but got stack trace:\n");
+ for (Frame f in stack['frames']) {
+ sb.write(" $f\n");
+ }
+ throw sb.toString();
+ }
};
}

Powered by Google App Engine
This is Rietveld 408576698