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

Unified Diff: pkg/analysis_server/test/integration/integration_test_methods.dart

Issue 2703033002: Add a diagnostic.getServerPort analysis server request. (Closed)
Patch Set: nits to the spec doc Created 3 years, 10 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: pkg/analysis_server/test/integration/integration_test_methods.dart
diff --git a/pkg/analysis_server/test/integration/integration_test_methods.dart b/pkg/analysis_server/test/integration/integration_test_methods.dart
index 4bad372f81c95002987cfd5c07f6711d038dee45..14251bba346577299b2951a0648d9dd7c3d6577c 100644
--- a/pkg/analysis_server/test/integration/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/integration_test_methods.dart
@@ -1630,6 +1630,23 @@ abstract class IntegrationTestMixin {
}
/**
+ * Return the port of the diagnostic web server. If the server is not running
+ * this call will start the server. If unable to start the diagnostic web
+ * server, this call will return an error of DEBUG_PORT_COULD_NOT_BE_OPENED.
+ *
+ * Returns
+ *
+ * port (int)
+ *
+ * The diagnostic server port.
+ */
+ Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async {
+ var result = await server.send("diagnostic.getServerPort", null);
+ ResponseDecoder decoder = new ResponseDecoder(null);
+ return new DiagnosticGetServerPortResult.fromJson(decoder, 'result', result);
+ }
+
+ /**
* Initialize the fields in InttestMixin, and ensure that notifications will
* be handled.
*/

Powered by Google App Engine
This is Rietveld 408576698