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

Side by Side Diff: pkg/webdriver/lib/webdriver.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « pkg/unittest/lib/src/config.dart ('k') | runtime/lib/regexp_patch.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 webdriver; 5 library webdriver;
6 6
7 import 'dart:json'; 7 import 'dart:json';
8 import 'dart:uri'; 8 import 'dart:uri';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:math'; 10 import 'dart:math';
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 String get path => _path; 195 String get path => _path;
196 String get url => _url; 196 String get url => _url;
197 197
198 /** 198 /**
199 * The default URL for WebDriver remote server is 199 * The default URL for WebDriver remote server is
200 * http://localhost:4444/wd/hub. 200 * http://localhost:4444/wd/hub.
201 */ 201 */
202 WebDriverBase.fromUrl([this._url = 'http://localhost:4444/wd/hub']) { 202 WebDriverBase.fromUrl([this._url = 'http://localhost:4444/wd/hub']) {
203 // Break out the URL components. 203 // Break out the URL components.
204 var re = new RegExp('[^:/]+://([^/]+)(/.*)'); 204 var re = const RegExp('[^:/]+://([^/]+)(/.*)');
205 var matches = re.firstMatch(_url); 205 var matches = re.firstMatch(_url);
206 _host = matches[1]; 206 _host = matches[1];
207 _path = matches[2]; 207 _path = matches[2];
208 var idx = _host.indexOf(':'); 208 var idx = _host.indexOf(':');
209 if (idx >= 0) { 209 if (idx >= 0) {
210 _port = parseInt(_host.substring(idx+1)); 210 _port = parseInt(_host.substring(idx+1));
211 _host = _host.substring(0, idx); 211 _host = _host.substring(0, idx);
212 } else { 212 } else {
213 _port = 80; 213 _port = 80;
214 } 214 }
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 * Get the log for a given log type. Log buffer is reset after each request. 1357 * Get the log for a given log type. Log buffer is reset after each request.
1358 * Each log entry is a [Map] with these fields: 1358 * Each log entry is a [Map] with these fields:
1359 * 1359 *
1360 * 'timestamp' (int) - The timestamp of the entry. 1360 * 'timestamp' (int) - The timestamp of the entry.
1361 * 'level' (String) - The log level of the entry, for example, "INFO". 1361 * 'level' (String) - The log level of the entry, for example, "INFO".
1362 * 'message' (String) - The log message. 1362 * 'message' (String) - The log message.
1363 */ 1363 */
1364 Future<List<Map>> getLogs(String type) => 1364 Future<List<Map>> getLogs(String type) =>
1365 _post('log', params: { 'type': type }); 1365 _post('log', params: { 'type': type });
1366 } 1366 }
OLDNEW
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | runtime/lib/regexp_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698