| Index: tests/html/websocket_test.dart
|
| diff --git a/tests/html/websocket_test.dart b/tests/html/websocket_test.dart
|
| index 9241d214c0bf0da18d225988de93c524a0d41793..1715c884def1573c7c4dd8ab0c29342256f71d2c 100644
|
| --- a/tests/html/websocket_test.dart
|
| +++ b/tests/html/websocket_test.dart
|
| @@ -39,28 +39,11 @@ main() {
|
| });
|
| });
|
|
|
| - test('regression for 19137', () {
|
| - // The server supports ws, but not wss, this will yield an error that we
|
| - // expect to catch below.
|
| - var socket = new WebSocket('wss://${window.location.host}/ws');
|
| - socket.onOpen.first.then((_) => socket.send('hello!'));
|
| + test('error handling', () {
|
| + var socket = new WebSocket('ws://${window.location.host}/ws');
|
| + socket.onOpen.first.then((_) => socket.send('close-with-error'));
|
| return socket.onError.first.then((e) {
|
| - // This test is modeled after a comment in issue #19137. We haven't
|
| - // verified that this is the casue, but the theory is that on Safari
|
| - // we will reach this point correctly, we then try to get an
|
| - // interceptor for `e` to call `.toString` on it, but our
|
| - // get-interceptor logic crashes. This is because the process of
|
| - // finding the interceptor may ask to extract the constructor name,
|
| - // and that code assumes that the name matches a specific regular
|
| - // expression. Apparently that regular expression doesn't match on
|
| - // Safari 7 and the line below would ends up throwing and error of the
|
| - // form:
|
| - //
|
| - // TypeError: null is not an object (evaluating
|
| - // 'String(a.constructor).match(/^\s*function\s*([\w$]*)\s*\(/)')
|
| - // at ...
|
| - //
|
| - print('$e was caught');
|
| + print('$e was caught, yay!');
|
| socket.close();
|
| });
|
| });
|
|
|