f0d88cc96d
This reverts commit ed120c3c80.
Change-Id: I445f4bb2dafaad3ce2daa3ae42efe1723f9b1abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160660
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
36 lines
1.1 KiB
Dart
36 lines
1.1 KiB
Dart
// Copyright (c) 2020, 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.
|
|
|
|
import 'package:dds/dds.dart';
|
|
import 'package:observatory/service_io.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
import 'test_helper.dart';
|
|
|
|
final tests = <DDSTest>[
|
|
(VM vm, DartDevelopmentService dds) async {
|
|
final client = WebSocketVM(
|
|
WebSocketVMTarget(
|
|
dds.wsUri.toString(),
|
|
),
|
|
);
|
|
final result = await client.invokeRpcNoUpgrade('getSupportedProtocols', {});
|
|
final protocols = result['protocols'];
|
|
expect(protocols.length, 2);
|
|
bool supportsVmProtocol = false;
|
|
bool supportsDdsProtocol = false;
|
|
for (final protocol in protocols) {
|
|
if (protocol['protocolName'] == 'VM Service') {
|
|
supportsVmProtocol = true;
|
|
} else if (protocol['protocolName'] == 'DDS') {
|
|
supportsDdsProtocol = true;
|
|
}
|
|
}
|
|
expect(supportsVmProtocol, true);
|
|
expect(supportsDdsProtocol, true);
|
|
}
|
|
];
|
|
|
|
main(args) async => runDDSTests(args, tests);
|