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

Side by Side Diff: lib/src/runner/browser/browser_manager.dart

Issue 983573002: Add support for running browser tests to the test runner. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 9 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
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 library unittest.runner.browser.browser_manager; 5 library unittest.runner.browser.browser_manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:http_parser/http_parser.dart'; 10 import 'package:http_parser/http_parser.dart';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return suiteChannel.stream.first.then((response) { 52 return suiteChannel.stream.first.then((response) {
53 if (response["type"] == "loadException") { 53 if (response["type"] == "loadException") {
54 return new Future.error(new LoadException(path, response["message"])); 54 return new Future.error(new LoadException(path, response["message"]));
55 } else if (response["type"] == "error") { 55 } else if (response["type"] == "error") {
56 var asyncError = RemoteException.deserialize(response["error"]); 56 var asyncError = RemoteException.deserialize(response["error"]);
57 return new Future.error( 57 return new Future.error(
58 new LoadException(path, asyncError.error), 58 new LoadException(path, asyncError.error),
59 asyncError.stackTrace); 59 asyncError.stackTrace);
60 } 60 }
61 61
62 return new Suite(path, response["tests"].map((test) { 62 return new Suite(response["tests"].map((test) {
63 var testChannel = suiteChannel.virtualChannel(test['channel']); 63 var testChannel = suiteChannel.virtualChannel(test['channel']);
64 return new IframeTest(test['name'], testChannel); 64 return new IframeTest(test['name'], testChannel);
65 })); 65 }), path: path, platform: "Chrome");
66 }); 66 });
67 } 67 }
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698