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

Unified Diff: tests/html/websocket_test.dart

Issue 1510763006: Fix #19137: handle when regexp doesn't match in constructorNameFallback (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
});
});
}
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698