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

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

Issue 1311503004: Remember when an isolate was paused and subtly display it in Obseravatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/service/pause_on_start_and_exit_test.dart
diff --git a/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart b/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
index b7f7935be55891753eda0c9742e49c7f9b9e5368..7c63e9d609201d00151199497a338f92be0aa690 100644
--- a/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
+++ b/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
@@ -4,6 +4,7 @@
// VMOptions=--error_on_bad_type --error_on_bad_override
import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
import 'test_helper.dart';
import 'dart:async';
@@ -33,6 +34,15 @@ var tests = [
await completer.future;
}
+ // Grab the timestamp.
+ var pausetime1 = isolate.pauseEvent.timestamp;
+ expect(pausetime1, isNotNull);
+ // Reload the isolate.
+ await isolate.reload();
+ // Verify that it is the same.
+ expect(pausetime1.millisecondsSinceEpoch,
+ equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
+
completer = new Completer();
stream = await isolate.vm.getEventStream(VM.kDebugStream);
subscription = stream.listen((ServiceEvent event) {
@@ -48,6 +58,17 @@ var tests = [
// Wait for the isolate to hit PauseExit.
await completer.future;
+
+ // Grab the timestamp.
+ var pausetime2 = isolate.pauseEvent.timestamp;
+ expect(pausetime2, isNotNull);
+ // Reload the isolate.
+ await isolate.reload();
+ // Verify that it is the same.
+ expect(pausetime2.millisecondsSinceEpoch,
+ equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
+ expect(pausetime2.millisecondsSinceEpoch,
+ greaterThan(pausetime1.millisecondsSinceEpoch));
},
];

Powered by Google App Engine
This is Rietveld 408576698