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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library WebSocketTest; 1 library WebSocketTest;
2 import 'package:unittest/unittest.dart'; 2 import 'package:unittest/unittest.dart';
3 import 'package:unittest/html_individual_config.dart'; 3 import 'package:unittest/html_individual_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 7
8 useHtmlIndividualConfiguration(); 8 useHtmlIndividualConfiguration();
9 9
10 group('supported', () { 10 group('supported', () {
(...skipping 17 matching lines...) Expand all
28 if (WebSocket.supported) { 28 if (WebSocket.supported) {
29 test('echo', () { 29 test('echo', () {
30 var socket = new WebSocket('ws://${window.location.host}/ws'); 30 var socket = new WebSocket('ws://${window.location.host}/ws');
31 31
32 socket.onOpen.first.then((_) { 32 socket.onOpen.first.then((_) {
33 socket.send('hello!'); 33 socket.send('hello!');
34 }); 34 });
35 35
36 return socket.onMessage.first.then((MessageEvent e) { 36 return socket.onMessage.first.then((MessageEvent e) {
37 expect(e.data, 'hello!'); 37 expect(e.data, 'hello!');
38 socket.close();
39 });
40 });
41
42 test('error', () {
43 // 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.
44 // expect to catch below.
45 var socket = new WebSocket('wss://${window.location.host}/ws');
46 socket.onOpen.first.then((_) => socket.send('hello!'));
47 return socket.onError.first.then((e) {
48 // This test checks fo regressions of issue #19137: on Safari 7 an
49 // error like this one would be seen, but dart2js's logic to provide
50 // an interceptor failed while trying to compute the name of the
51 // 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
52 print('$e was caught');
53 socket.close();
38 }); 54 });
39 }); 55 });
40 } 56 }
41 }); 57 });
42 } 58 }
OLDNEW
« 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