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

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

Issue 2270013002: Converted Observatory context-view element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed access to instance function Created 4 years, 4 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/observatory/tests/observatory_ui/mocks/repositories/context.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/contexts_test.dart
diff --git a/runtime/observatory/tests/service/contexts_test.dart b/runtime/observatory/tests/service/contexts_test.dart
index 12bbbfb4780e44af93a7e7ba2cab5bb7c13aaed0..c91bfce55dcc7410991f92697a807875b1456080 100644
--- a/runtime/observatory/tests/service/contexts_test.dart
+++ b/runtime/observatory/tests/service/contexts_test.dart
@@ -74,8 +74,9 @@ var tests = [
expect(block.context.isContext, isTrue);
expect(block.context.length, equals(1));
return block.context.load().then((Context ctxt) {
- expect(ctxt.variables.single['value'].isString, isTrue);
- expect(ctxt.variables.single['value'].valueAsString, equals('I could be copied into the block'));
+ expect(ctxt.variables.single.value.asValue.isString, isTrue);
+ expect(ctxt.variables.single.value.asValue.valueAsString,
+ equals('I could be copied into the block'));
expect(ctxt.parentContext.isContext, isTrue);
expect(ctxt.parentContext.length, equals(0));
return ctxt.parentContext.load().then((Context outerCtxt) {
@@ -94,9 +95,9 @@ var tests = [
expect(block.isClosure, isTrue);
expect(block.context.isContext, isTrue);
expect(block.context.length, equals(1));
- return block.context.load().then((ctxt) {
- expect(ctxt.variables.single['value'].isInt, isTrue);
- expect(ctxt.variables.single['value'].valueAsString, equals('43'));
+ return block.context.load().then((Context ctxt) {
+ expect(ctxt.variables.single.value.asValue.isInt, isTrue);
+ expect(ctxt.variables.single.value.asValue.valueAsString, equals('43'));
expect(ctxt.parentContext.isContext, isTrue);
expect(ctxt.parentContext.length, equals(0));
return ctxt.parentContext.load().then((Context outerCtxt) {
@@ -116,13 +117,15 @@ var tests = [
expect(block.context.isContext, isTrue);
expect(block.context.length, equals(1));
return block.context.load().then((Context ctxt) {
- expect(ctxt.variables.single['value'].isInt, isTrue);
- expect(ctxt.variables.single['value'].valueAsString, equals('4201'));
+ expect(ctxt.variables.single.value.asValue.isInt, isTrue);
+ expect(ctxt.variables.single.value.asValue.valueAsString,
+ equals('4201'));
expect(ctxt.parentContext.isContext, isTrue);
expect(ctxt.parentContext.length, equals(1));
return ctxt.parentContext.load().then((Context outerCtxt) {
- expect(outerCtxt.variables.single['value'].isInt, isTrue);
- expect(outerCtxt.variables.single['value'].valueAsString, equals('421'));
+ expect(outerCtxt.variables.single.value.asValue.isInt, isTrue);
+ expect(outerCtxt.variables.single.value.asValue.valueAsString,
+ equals('421'));
expect(outerCtxt.parentContext.isContext, isTrue);
expect(outerCtxt.parentContext.length, equals(0));
return outerCtxt.parentContext.load().then((Context outerCtxt2) {
« no previous file with comments | « runtime/observatory/tests/observatory_ui/mocks/repositories/context.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698