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

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

Issue 1160873002: Sundry service protocol cleanups before version 1.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: pre commit Created 5 years, 7 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/service/string_escaping_test.dart ('k') | runtime/vm/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/weak_properties_test.dart
diff --git a/runtime/observatory/tests/service/weak_properties_test.dart b/runtime/observatory/tests/service/weak_properties_test.dart
index cdcb6451da1f4fab709916e6d525a16b1647a362..30ae2a033535d96cfc160073c2d7d1ed2a649cf9 100644
--- a/runtime/observatory/tests/service/weak_properties_test.dart
+++ b/runtime/observatory/tests/service/weak_properties_test.dart
@@ -34,30 +34,32 @@ void script() {
var tests = [
-(Isolate isolate) =>
- isolate.rootLibrary.load().then((Library lib) {
+ (Isolate isolate) async {
+ var lib = await isolate.rootLibrary.load();
Field keyField = lib.variables.singleWhere((v) => v.name == 'key');
- Instance key = keyField.value;
+ await keyField.load();
+ Instance key = keyField.staticValue;
Field valueField = lib.variables.singleWhere((v) => v.name == 'value');
- Instance value = valueField.value;
+ await valueField.load();
+ Instance value = valueField.staticValue;
Field propField = lib.variables.singleWhere((v) => v.name == 'weak_property');
- Instance prop = propField.value;
+ await propField.load();
+ Instance prop = propField.staticValue;
expect(key.isWeakProperty, isFalse);
expect(value.isWeakProperty, isFalse);
expect(prop.isWeakProperty, isTrue);
expect(prop.key, isNull);
expect(prop.value, isNull);
- return prop.load().then((Instance loadedProp) {
- // Object ids are not cannonicalized, so we rely on the key and value
- // being the sole instances of their classes to test we got the objects
- // we expect.
- expect(loadedProp.key, isNotNull);
- expect(loadedProp.key.clazz, equals(key.clazz));
- expect(loadedProp.value, isNotNull);
- expect(loadedProp.value.clazz, equals(value.clazz));
- });
- }),
+ Instance loadedProp = await prop.load();
+ // Object ids are not cannonicalized, so we rely on the key and value
+ // being the sole instances of their classes to test we got the objects
+ // we expect.
+ expect(loadedProp.key, isNotNull);
+ expect(loadedProp.key.clazz, equals(key.clazz));
+ expect(loadedProp.value, isNotNull);
+ expect(loadedProp.value.clazz, equals(value.clazz));
+ },
];
« no previous file with comments | « runtime/observatory/tests/service/string_escaping_test.dart ('k') | runtime/vm/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698