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

Unified Diff: runtime/bin/vmservice/observatory/test/contexts_test.dart

Issue 561053003: Give fields a model class in the service library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: build Created 6 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/bin/vmservice/observatory/test/contexts_test.dart
diff --git a/runtime/bin/vmservice/observatory/test/contexts_test.dart b/runtime/bin/vmservice/observatory/test/contexts_test.dart
index 05ae127e8fe6c825e593e3265cf39ab6d368e2bc..6eda397e1032cfb14d38f6eade2e92e109e8df8c 100644
--- a/runtime/bin/vmservice/observatory/test/contexts_test.dart
+++ b/runtime/bin/vmservice/observatory/test/contexts_test.dart
@@ -52,8 +52,8 @@ var tests = [
(Isolate isolate) =>
isolate.rootLib.load().then((Library lib) {
- ServiceMap field = lib.variables.singleWhere((v) => v.name == 'cleanBlock');
- return field['value'].load().then((Instance block) {
+ Field field = lib.variables.singleWhere((v) => v.name == 'cleanBlock');
+ return field.value.load().then((Instance block) {
expect(block.isClosure, isTrue);
expect(block.closureCtxt.isContext, isTrue);
expect(block.closureCtxt.length, equals(0));
@@ -65,8 +65,8 @@ var tests = [
(Isolate isolate) =>
isolate.rootLib.load().then((Library lib) {
- ServiceMap field = lib.variables.singleWhere((v) => v.name == 'copyingBlock');
- return field['value'].load().then((Instance block) {
+ Field field = lib.variables.singleWhere((v) => v.name == 'copyingBlock');
+ return field.value.load().then((Instance block) {
expect(block.isClosure, isTrue);
expect(block.closureCtxt.isContext, isTrue);
expect(block.closureCtxt.length, equals(1));
@@ -80,8 +80,8 @@ var tests = [
(Isolate isolate) =>
isolate.rootLib.load().then((Library lib) {
- ServiceMap field = lib.variables.singleWhere((v) => v.name == 'fullBlock');
- return field['value'].load().then((Instance block) {
+ Field field = lib.variables.singleWhere((v) => v.name == 'fullBlock');
+ return field.value.load().then((Instance block) {
expect(block.isClosure, isTrue);
expect(block.closureCtxt.isContext, isTrue);
expect(block.closureCtxt.length, equals(1));
@@ -95,8 +95,8 @@ var tests = [
(Isolate isolate) =>
isolate.rootLib.load().then((Library lib) {
- ServiceMap field = lib.variables.singleWhere((v) => v.name == 'fullBlockWithChain');
- return field['value'].load().then((Instance block) {
+ Field field = lib.variables.singleWhere((v) => v.name == 'fullBlockWithChain');
+ return field.value.load().then((Instance block) {
expect(block.isClosure, isTrue);
expect(block.closureCtxt.isContext, isTrue);
expect(block.closureCtxt.length, equals(1));

Powered by Google App Engine
This is Rietveld 408576698