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

Side by Side Diff: test/runner/browser/dartium_test.dart

Issue 1664433002: Support shelf 0.7.0. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 10 months 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 | « test/runner/browser/content_shell_test.dart ('k') | test/runner/browser/firefox_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'package:scheduled_test/descriptor.dart' as d; 7 import 'package:scheduled_test/descriptor.dart' as d;
8 import 'package:scheduled_test/scheduled_stream.dart'; 8 import 'package:scheduled_test/scheduled_stream.dart';
9 import 'package:scheduled_test/scheduled_test.dart'; 9 import 'package:scheduled_test/scheduled_test.dart';
10 import 'package:test/src/runner/browser/dartium.dart'; 10 import 'package:test/src/runner/browser/dartium.dart';
(...skipping 16 matching lines...) Expand all
27 server.handleDart(''' 27 server.handleDart('''
28 var webSocket = new WebSocket( 28 var webSocket = new WebSocket(
29 window.location.href.replaceFirst("http://", "ws://")); 29 window.location.href.replaceFirst("http://", "ws://"));
30 await webSocket.onOpen.first; 30 await webSocket.onOpen.first;
31 webSocket.send("loaded!"); 31 webSocket.send("loaded!");
32 '''); 32 ''');
33 33
34 var webSocket = server.handleWebSocket(); 34 var webSocket = server.handleWebSocket();
35 35
36 schedule(() async { 36 schedule(() async {
37 expect(await (await webSocket).first, equals("loaded!")); 37 expect(await (await webSocket).stream.first, equals("loaded!"));
38 }); 38 });
39 }); 39 });
40 40
41 test("a process can be killed synchronously after it's started", () async { 41 test("a process can be killed synchronously after it's started", () async {
42 var server = new CodeServer(); 42 var server = new CodeServer();
43 43
44 schedule(() async { 44 schedule(() async {
45 var dartium = new Dartium(await server.url); 45 var dartium = new Dartium(await server.url);
46 await dartium.close(); 46 await dartium.close();
47 }); 47 });
(...skipping 28 matching lines...) Expand all
76 void main() { 76 void main() {
77 test("failure", () => throw new TestFailure("oh no")); 77 test("failure", () => throw new TestFailure("oh no"));
78 } 78 }
79 """).create(); 79 """).create();
80 80
81 var test = runTest(["-p", "dartium", "test.dart"]); 81 var test = runTest(["-p", "dartium", "test.dart"]);
82 test.stdout.expect(consumeThrough(contains("-1: Some tests failed."))); 82 test.stdout.expect(consumeThrough(contains("-1: Some tests failed.")));
83 test.shouldExit(1); 83 test.shouldExit(1);
84 }); 84 });
85 } 85 }
OLDNEW
« no previous file with comments | « test/runner/browser/content_shell_test.dart ('k') | test/runner/browser/firefox_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698