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

Side by Side Diff: tests/standalone/io/http_auth_test.dart

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_basic_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:crypto'; 7 import 'dart:crypto';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:uri'; 10 import 'dart:uri';
11 import 'dart:utf'; 11 import 'dart:utf';
12 12
13 class Server { 13 class Server {
14 HttpServer server; 14 HttpServer server;
15 bool passwordChanged = false; 15 bool passwordChanged = false;
16 16
17 Future<Server> start() { 17 Future<Server> start() {
18 var completer = new Completer(); 18 var completer = new Completer();
19 HttpServer.bind().then((s) { 19 HttpServer.bind("127.0.0.1", 0).then((s) {
20 server = s; 20 server = s;
21 server.listen((HttpRequest request) { 21 server.listen((HttpRequest request) {
22 var response = request.response; 22 var response = request.response;
23 if (request.uri.path == "/passwdchg") { 23 if (request.uri.path == "/passwdchg") {
24 passwordChanged = true; 24 passwordChanged = true;
25 response.close(); 25 response.close();
26 return; 26 return;
27 }; 27 };
28 28
29 String username; 29 String username;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 main() { 260 main() {
261 testUrlUserInfo(); 261 testUrlUserInfo();
262 testBasicNoCredentials(); 262 testBasicNoCredentials();
263 testBasicCredentials(); 263 testBasicCredentials();
264 testBasicAuthenticateCallback(); 264 testBasicAuthenticateCallback();
265 // These teste are not normally run. They can be used for locally 265 // These teste are not normally run. They can be used for locally
266 // testing with another web server (e.g. Apache). 266 // testing with another web server (e.g. Apache).
267 //testLocalServerBasic(); 267 //testLocalServerBasic();
268 //testLocalServerDigest(); 268 //testLocalServerDigest();
269 } 269 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_basic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698