| Index: tests/html/websocket_test.dart
|
| diff --git a/tests/html/websocket_test.dart b/tests/html/websocket_test.dart
|
| index 982afa42bb1cd434c1f6eeed047e468656723d18..1738ecec8e1769f5d690c7252fca7d125a1e565d 100644
|
| --- a/tests/html/websocket_test.dart
|
| +++ b/tests/html/websocket_test.dart
|
| @@ -1,17 +1,28 @@
|
| library WebSocketTest;
|
| import '../../pkg/unittest/lib/unittest.dart';
|
| -import '../../pkg/unittest/lib/html_config.dart';
|
| +import '../../pkg/unittest/lib/html_individual_config.dart';
|
| import 'dart:html';
|
|
|
| main() {
|
|
|
| - useHtmlConfiguration();
|
| + useHtmlIndividualConfiguration();
|
|
|
| - var isWebSocket = predicate((x) => x is WebSocket, 'is a WebSocket');
|
| + group('supported', () {
|
| + test('supported', () {
|
| + expect(WebSocket.supported, true);
|
| + });
|
| + });
|
| +
|
| + group('websocket', () {
|
| + var isWebSocket = predicate((x) => x is WebSocket, 'is a WebSocket');
|
| + var expectation = WebSocket.supported ? returnsNormally : throws;
|
|
|
| - test('constructorTest', () {
|
| - var socket = new WebSocket('ws://localhost');
|
| - expect(socket, isNotNull);
|
| - expect(socket, isWebSocket);
|
| + test('constructorTest', () {
|
| + expect(() {
|
| + var socket = new WebSocket('ws://localhost');
|
| + expect(socket, isNotNull);
|
| + expect(socket, isWebSocket);
|
| + }, expectation);
|
| + });
|
| });
|
| }
|
|
|