Index: tests/html/websocket_test.dart |
diff --git a/tests/html/websocket_test.dart b/tests/html/websocket_test.dart |
index f8ba1baed37cf4c889306c71dd129f12ba1b6788..3db3f82ad0d1ac7258396f9b5e84a069b2b887aa 100644 |
--- a/tests/html/websocket_test.dart |
+++ b/tests/html/websocket_test.dart |
@@ -35,6 +35,22 @@ main() { |
return socket.onMessage.first.then((MessageEvent e) { |
expect(e.data, 'hello!'); |
+ socket.close(); |
+ }); |
+ }); |
+ |
+ test('error', () { |
+ // The server supports ws, but not wss, this will yeild an error that we |
sra1
2015/12/10 05:30:38
yield
Siggi Cherem (dart-lang)
2015/12/10 20:27:39
Done.
|
+ // expect to catch below. |
+ var socket = new WebSocket('wss://${window.location.host}/ws'); |
+ socket.onOpen.first.then((_) => socket.send('hello!')); |
+ return socket.onError.first.then((e) { |
+ // This test checks fo regressions of issue #19137: on Safari 7 an |
+ // error like this one would be seen, but dart2js's logic to provide |
+ // an interceptor failed while trying to compute the name of the |
+ // constructor. |
sra1
2015/12/10 05:30:38
I'm not clear how this fails / passes. Can you exp
Siggi Cherem (dart-lang)
2015/12/10 20:27:39
Done - added more details.
I was not able to veri
|
+ print('$e was caught'); |
+ socket.close(); |
}); |
}); |
} |