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

Unified Diff: runtime/observatory/tests/observatory_ui/mocks/objects/persistent_handles.dart

Issue 2273203004: Converted Observatory persistent-hangles-page element (Closed)
Patch Set: Fixed finalizer name visualization 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
Index: runtime/observatory/tests/observatory_ui/mocks/objects/persistent_handles.dart
diff --git a/runtime/observatory/tests/observatory_ui/mocks/objects/persistent_handles.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/persistent_handles.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5e65785655e431bb9fd986929d2d4b8166709cb1
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/persistent_handles.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+class PersistentHandlesMock implements M.PersistentHandles {
+ final Iterable<M.PersistentHandle> elements;
+ final Iterable<M.WeakPersistentHandle> weakElements;
+
+ const PersistentHandlesMock({this.elements: const [],
+ this.weakElements: const []});
+}
+
+class PersistentHandleMock implements M.PersistentHandle {
+ final M.ObjectRef object;
+
+ const PersistentHandleMock({this.object: const InstanceRefMock()});
+}
+
+class WeakPersistentHandleMock implements M.WeakPersistentHandle {
+ final M.ObjectRef object;
+ final int externalSize;
+ final String peer;
+ final String callbackSymbolName;
+ final String callbackAddress;
+
+ const WeakPersistentHandleMock({this.object: const InstanceRefMock(),
+ this.externalSize: 0, this.peer: '0x0',
+ this.callbackSymbolName: 'dart::Something()',
+ this.callbackAddress: '0x123456'});
+}

Powered by Google App Engine
This is Rietveld 408576698