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

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

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)
Patch Set: CHANGELOG.md merge and fatal error Created 4 years, 1 month 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/developer_server_control_test.dart
diff --git a/runtime/observatory/tests/service/developer_server_control_test.dart b/runtime/observatory/tests/service/developer_server_control_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..fc1e9405cf4fcd4e0e4cbfa7ff6a0bf5687dbb30
--- /dev/null
+++ b/runtime/observatory/tests/service/developer_server_control_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2014, 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.
+// VMOptions=--error_on_bad_type --error_on_bad_override
+
+import 'dart:async';
+import 'dart:developer';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+
+Future<Null> testeeBefore() async {
+ print('testee before');
+ print(await Service.getInfo());
+ // Start the web server.
+ ServiceProtocolInfo info = await Service.controlWebServer(enable: true);
+ print(info);
+}
+
+var tests = [
+(Isolate isolate) async {
+ await isolate.reload();
+ // Just getting here means that the testee enabled the service protocol
+ // web server.
+ expect(true, true);
+}
+];
+
+main(args) => runIsolateTests(args,
+ tests,
+ testeeBefore: testeeBefore,
+ // the testee is responsible for starting the
+ // web server.
+ testeeControlsServer: true);
« no previous file with comments | « runtime/observatory/lib/src/repositories/target.dart ('k') | runtime/observatory/tests/service/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698