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

Side by Side Diff: pkg/webdriver/test/webdriver_test.dart

Issue 12413012: Bring webdriver up to date with SDK changes, and a bit of refactoring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 library webdriver_test; 1 library webdriver_test;
2 import 'package:webdriver/webdriver.dart'; 2 import 'package:webdriver/webdriver.dart';
3 import 'package:unittest/unittest.dart'; 3 import 'package:unittest/unittest.dart';
4 import 'package:unittest/vm_config.dart';
4 5
5 WebDriver web_driver; 6 WebDriver web_driver;
6 7
7 /** 8 /**
8 * These tests are not expected to be run as part of normal automated testing, 9 * These tests are not expected to be run as part of normal automated testing,
9 * as they are slow, many of them do not yet work due to WebDriver limitations, 10 * as they are slow and they have external dependencies.
10 * and they have external dependencies. Nontheless it is useful to keep them
11 * here for manual testing.
12 */ 11 */
13 main() { 12 main() {
13 useVMConfiguration();
14
14 var web_driver = new WebDriver('localhost', 4444, '/wd/hub'); 15 var web_driver = new WebDriver('localhost', 4444, '/wd/hub');
15 var session = null; 16 var session = null;
16 var completionCallback;
17 17
18 var exceptionHandler = (e) { 18 var exceptionHandler = (e) {
19 print('Handled: ${e.toString()}'); 19 if (e.error is TestFailure) {
20 currentTestCase.fail(e.error.message, e.stackTrace.toString());
21 } else {
22 currentTestCase.error("Unexpected error: ${e.error}",
23 e.stackTrace.toString());
24 }
20 if (session != null) { 25 if (session != null) {
21 session.close().then((_){ 26 var s = session;
22 session = null; 27 session = null;
23 config.handleExternalError(e, 'Unexpected failure'); 28 s.close();
24 });
25 } 29 }
26 return true;
27 }; 30 };
28 31
29 group('Sessionless tests', () { 32 group('Sessionless tests', () {
30 setUp(() {
31 completionCallback = expectAsync0((){
32 });
33 });
34
35 test('Get status', () { 33 test('Get status', () {
36 Future f = web_driver.getStatus(); 34 return web_driver.getStatus()
37 f.handleException(exceptionHandler); 35 .then((status) {
38 f.then((status) { 36 expect(status['sessionId'], isNull);
39 expect(status['sessionId'], isNull); 37 })
40 completionCallback(); 38 .catchError(exceptionHandler);
41 });
42 }); 39 });
43 }); 40 });
44 41
45 group('Basic session tests', () { 42 group('Basic session tests', () {
46 setUp(() {
47 completionCallback = expectAsync0((){
48 });
49 });
50
51 test('Create session/get capabilities', () { 43 test('Create session/get capabilities', () {
52 Future f = web_driver.newSession('chrome'); 44 return web_driver.newSession('chrome')
53 f.handleException(exceptionHandler); 45 .then((_session) {
54 f.chain((_session) { 46 expect(_session, isNotNull);
55 session = _session; 47 session = _session;
56 return session.getCapabilities(); 48 return session.getCapabilities();
57 }).chain((capabilities) { 49 })
58 expect(capabilities['browserName'], equals('chrome')); 50 .then((capabilities) {
59 return session.close(); 51 expect(capabilities, isNotNull);
60 }).then((_) { 52 expect(capabilities['browserName'], equals('chrome'));
61 session = null; 53 return session.close();
62 completionCallback(); 54 })
63 }); 55 .then((_) {
56 session = null;
57 })
58 .catchError(exceptionHandler);
64 }); 59 });
65 60
66 test('Create and get multiple sessions', () { 61 test('Create and get multiple sessions', () {
67 Future f = web_driver.newSession('chrome');
68 var session2 = null; 62 var session2 = null;
69 f.handleException(exceptionHandler); 63 return web_driver.newSession('chrome')
70 f.chain((_session) { 64 .then((_session) {
71 session = _session; 65 session = _session;
72 return web_driver.newSession('firefox'); 66 return web_driver.newSession('chrome');
73 }).chain((_session) { 67 })
74 session2 = _session; 68 .then((_session) {
75 return web_driver.getSessions(); 69 session2 = _session;
76 }).chain((sessions) { 70 return web_driver.getSessions();
77 expect(sessions.length, greaterThanOrEqualTo(2)); 71 })
78 return session2.close(); 72 .then((sessions) {
79 }).chain((_) { 73 expect(sessions.length, greaterThanOrEqualTo(2));
80 return session.close(); 74 return session2.close();
81 }).then((_) { 75 })
82 session = null; 76 .then((_) {
83 completionCallback(); 77 return session.close();
84 }); 78 })
79 .then((_) {
80 session = null;
81 })
82 .catchError(exceptionHandler);
85 }); 83 });
86 84
87 test('Set/get url', () { 85 test('Set/get url', () {
88 Future f = web_driver.newSession('chrome'); 86 return web_driver.newSession('chrome')
89 f.handleException(exceptionHandler); 87 .then((_session) {
90 f.chain((_session) { 88 session = _session;
91 session = _session; 89 return session.setUrl('http://translate.google.com');
92 return session.setUrl('http://translate.google.com'); 90 })
93 }).chain((_) { 91 .then((_) {
94 return session.getUrl(); 92 return session.getUrl();
95 }).chain((u) { 93 })
96 expect(u, equals('http://translate.google.com/')); 94 .then((u) {
97 return session.close(); 95 expect(u, equals('http://translate.google.com/'));
98 }).then((_) { 96 return session.close();
99 session = null; 97 })
100 completionCallback(); 98 .then((_) {
101 }); 99 session = null;
100 })
101 .catchError(exceptionHandler);
102 }); 102 });
103 103
104 test('Navigation', () { 104 test('Navigation', () {
105 Future f = web_driver.newSession('chrome'); 105 return web_driver.newSession('chrome')
106 f.handleException(exceptionHandler); 106 .then((_session) {
107 f.chain((_session) { 107 session = _session;
108 session = _session; 108 return session.setUrl('http://translate.google.com');
109 return session.setUrl('http://translate.google.com'); 109 })
110 }).chain((_) { 110 .then((_) {
111 return session.setUrl('http://www.google.com'); 111 return session.setUrl('http://www.google.com');
112 }).chain((_) { 112 })
113 return session.navigateBack(); 113 .then((_) {
114 }).chain((_) { 114 return session.navigateBack();
115 return session.getUrl(); 115 })
116 }).chain((u) { 116 .then((_) {
117 expect(u, equals('http://translate.google.com/')); 117 return session.getUrl();
118 return session.navigateForward(); 118 })
119 }).chain((_) { 119 .then((u) {
120 return session.getUrl(); 120 expect(u, equals('http://translate.google.com/'));
121 }).chain((url) { 121 return session.navigateForward();
122 expect(url, equals('http://www.google.com/')); 122 })
123 return session.close(); 123 .then((_) {
124 }).then((_) { 124 return session.getUrl();
125 session = null; 125 })
126 completionCallback(); 126 .then((url) {
127 }); 127 expect(url, equals('http://www.google.com/'));
128 return session.close();
129 })
130 .then((_) {
131 session = null;
132 })
133 .catchError(exceptionHandler);
128 }); 134 });
129 135
130 test('Take a Screen shot', () { 136 test('Take a Screen shot', () {
131 Future f = web_driver.newSession('chrome'); 137 return web_driver.newSession('chrome')
132 f.handleException(exceptionHandler); 138 .then((_session) {
133 f.chain((_session) { 139 session = _session;
134 session = _session; 140 return session.setUrl('http://translate.google.com');
135 return session.setUrl('http://translate.google.com'); 141 })
136 }).chain((_) { 142 .then((_) {
137 return session.getScreenshot(); 143 return session.getScreenshot();
138 }).chain((image) { 144 })
139 expect(image.length, greaterThan(10000)); 145 .then((image) {
140 return session.close(); 146 expect(image.length, greaterThan(10000));
141 }).then((_) { 147 return session.close();
142 session = null; 148 })
143 completionCallback(); 149 .then((_) {
144 }); 150 session = null;
151 })
152 .catchError(exceptionHandler);
145 }); 153 });
146 }); 154 });
147 155
148 group('Window tests', () { 156 group('Window tests', () {
149 setUp(() {
150 completionCallback = expectAsync0((){
151 });
152 });
153
154 test('Window position and size', () { 157 test('Window position and size', () {
158 // We don't validate the results. Setting size and position is flaky.
159 // I tried with the Selenium python client code and found it had the
160 // same issue, so this is not a bug in the Dart code.
155 var window; 161 var window;
156 Future f = web_driver.newSession('chrome'); 162 return web_driver.newSession('chrome')
157 f.handleException(exceptionHandler); 163 .then((_session) {
158 f.chain((_session) { 164 session = _session;
159 session = _session; 165 return session.getWindow();
160 return session.getWindow(); 166 })
161 }).chain((_window) { 167 .then((_window) {
162 window = _window; 168 window = _window;
163 return window.setSize(200, 100); 169 return window.setSize(220, 400);
164 }).chain((_) { 170 })
165 return window.getSize(); 171 .then((_) {
166 }).chain((ws) { 172 return window.getSize();
167 expect(ws['width'], equals(200)); 173 })
168 expect(ws['height'], equals(100)); 174 .then((ws) {
169 return window.setPosition(100, 80); 175 return window.setPosition(100, 80);
170 }).chain((_) { 176 })
171 return window.getPosition(); 177 .then((_) {
172 }).chain((wp) { 178 return window.getPosition();
173 expect(wp['x'], equals(100)); 179 })
174 expect(wp['y'], equals(80)); 180 .then((wp) {
175 return session.close(); 181 return session.close();
176 }).then((_) { 182 })
177 session = null; 183 .then((_) {
178 completionCallback(); 184 session = null;
179 }); 185 })
186 .catchError(exceptionHandler);
180 }); 187 });
181 }); 188 });
182 189
183 group('Cookie tests', () { 190 group('Cookie tests', () {
184 setUp(() {
185 completionCallback = expectAsync0((){
186 });
187 });
188
189 test('Create/query/delete', () { 191 test('Create/query/delete', () {
190 var window; 192 var window;
191 var numcookies; 193 var numcookies;
192 Future f = web_driver.newSession('chrome'); 194 return web_driver.newSession('chrome')
193 f.handleException(exceptionHandler); 195 .then((_session) {
194 f.chain((_session) { 196 session = _session;
195 session = _session; 197 // Must go to a web page first to set a cookie.
196 // Must go to a web page first to set a cookie. 198 return session.setUrl('http://translate.google.com');
197 return session.setUrl('http://translate.google.com'); 199 })
198 }).chain((_) { 200 .then((_) {
199 return session.getCookies(); 201 return session.getCookies();
200 }).chain((cookies) { 202 })
201 numcookies = cookies.length; 203 .then((cookies) {
202 return session.setCookie({ 'name': 'foo', 'value': 'bar'}); 204 numcookies = cookies.length;
203 }).chain((_) { 205 return session.setCookie({ 'name': 'foo', 'value': 'bar'});
204 return session.getCookies(); 206 })
205 }).chain((cookies) { 207 .then((_) {
206 expect(cookies.length, equals(numcookies + 1)); 208 return session.getCookies();
207 expect(cookies, someElement(allOf( 209 })
208 containsPair('name', 'foo'), 210 .then((cookies) {
209 containsPair('value', 'bar')))); 211 expect(cookies.length, equals(numcookies + 1));
210 return session.deleteCookie('foo'); 212 expect(cookies, someElement(allOf(
211 }).chain((_) { 213 containsPair('name', 'foo'),
212 return session.getCookies(); 214 containsPair('value', 'bar'))));
213 }).chain((cookies) { 215 return session.deleteCookie('foo');
214 expect(cookies.length, numcookies); 216 })
215 expect(cookies, everyElement(isNot(containsPair('name', 'foo')))); 217 .then((_) {
216 return session.deleteCookie('foo'); 218 return session.getCookies();
217 }).chain((_) { 219 })
218 return session.getCookies(); 220 .then((cookies) {
219 }).chain((cookies) { 221 expect(cookies.length, numcookies);
220 expect(cookies.length, numcookies); 222 expect(cookies, everyElement(isNot(containsPair('name', 'foo'))));
221 return session.close(); 223 return session.deleteCookie('foo');
222 }).then((_) { 224 })
223 session = null; 225 .then((_) {
224 completionCallback(); 226 return session.getCookies();
225 }); 227 })
228 .then((cookies) {
229 expect(cookies.length, numcookies);
230 return session.close();
231 })
232 .then((_) {
233 session = null;
234 })
235 .catchError(exceptionHandler);
226 }); 236 });
227 }); 237 });
228 238
229 group('Storage tests', () { 239 group('Storage tests', () {
230 setUp(() {
231 completionCallback = expectAsync0((){
232 });
233 });
234
235 // Storage tests are return 500 errors. This seems to be a bug in
236 // the remote driver.
237
238 test('Local Storage Create/query/delete', () { 240 test('Local Storage Create/query/delete', () {
239 var window; 241 var window;
240 var numkeys; 242 var numkeys;
241 Future f = web_driver.newSession('htmlunit', { 'webStorageEnabled': true } ); 243 return web_driver.newSession('firefox', { 'webStorageEnabled': true })
242 f.handleException(exceptionHandler); 244 .then((_session) {
243 f.chain((_session) { 245 session = _session;
244 session = _session; 246 return session.getCapabilities();
245 // Must go to a web page first. 247 })
246 return session.setUrl('http://translate.google.com'); 248 .then((capabilities) {
247 }).chain((_) { 249 expect(capabilities, isNotNull);
248 return session.getLocalStorageKeys(); 250 expect(capabilities['webStorageEnabled'], isTrue);
249 }).chain((keys) { 251 // Must go to a web page first.
250 print(keys); 252 return session.setUrl('http://translate.google.com');
251 numkeys = keys.length; 253 })
252 return session.setLocalStorageItem('foo', 'bar'); 254 .then((_) {
253 }).chain((_) { 255 return session.getLocalStorageKeys();
254 return session.getLocalStorageKeys(); 256 })
255 }).chain((keys) { 257 .then((keys) {
256 expect(keys.length, equals(numkeys + 1)); 258 numkeys = keys.length;
257 expect(keys, someElement(equals('foo'))); 259 return session.setLocalStorageItem('foo', 'bar');
258 return session.getLocalStorageCount(); 260 })
259 }).chain((count) { 261 .then((_) {
260 expect(count, equals(numkeys + 1)); 262 return session.getLocalStorageKeys();
261 return session.getLocalStorageValue('foo'); 263 })
262 }).chain((value) { 264 .then((keys) {
263 expect(value, equals('bar')); 265 expect(keys.length, equals(numkeys + 1));
264 return session.deleteLocalStorageValue('foo'); 266 expect(keys, someElement(equals('foo')));
265 }).chain((_) { 267 return session.getLocalStorageCount();
266 return session.getLocalStorageKeys(); 268 })
267 }).chain((keys) { 269 .then((count) {
268 expect(keys.length, equals(numkeys)); 270 expect(count, equals(numkeys + 1));
269 expect(keys, everyElement(isNot(equals('foo')))); 271 return session.getLocalStorageValue('foo');
270 return session.setLocalStorageItem('foo', 'bar'); 272 })
271 }).chain((_) { 273 .then((value) {
272 return session.clearLocalStorage(); 274 expect(value, equals('bar'));
273 }).chain((_) { 275 return session.setLocalStorageItem('bar', 'foo');
274 return session.getLocalStorageKeys(); 276 })
275 }).chain((keys) { 277 .then((_) {
276 expect(keys.length, isZero); 278 return session.getLocalStorageKeys();
277 return session.close(); 279 })
278 }).then((_) { 280 .then((keys) {
279 session = null; 281 expect(keys.length, equals(numkeys + 2));
280 completionCallback(); 282 expect(keys, someElement(equals('bar')));
281 }); 283 expect(keys, someElement(equals('foo')));
284 return session.deleteLocalStorageValue('foo');
285 })
286 .then((_) {
287 return session.getLocalStorageKeys();
288 })
289 .then((keys) {
290 expect(keys.length, equals(numkeys + 1));
291 expect(keys, everyElement(isNot(equals('foo'))));
292 return session.setLocalStorageItem('foo', 'bar');
293 })
294 .then((_) {
295 return session.clearLocalStorage();
296 })
297 .then((_) {
298 return session.getLocalStorageKeys();
299 })
300 .then((keys) {
301 expect(keys.length, isZero);
302 return session.close();
303 })
304 .then((_) {
305 session = null;
306 })
307 .catchError(exceptionHandler);
282 }); 308 });
283 309
284 test('Session Storage Create/query/delete', () { 310 test('Session Storage Create/query/delete', () {
285 var window; 311 var window;
286 var numkeys; 312 var numkeys;
287 Future f = web_driver.newSession('chrome', { 'webStorageEnabled': true }); 313 return web_driver.newSession('chrome', { 'webStorageEnabled': true })
288 f.handleException(exceptionHandler); 314 .then((_session) {
289 f.chain((_session) { 315 session = _session;
290 session = _session; 316 // Must go to a web page first.
291 // Must go to a web page first. 317 return session.setUrl('http://translate.google.com');
292 return session.setUrl('http://translate.google.com'); 318 })
293 }).chain((_) { 319 .then((_) {
294 return session.getSessionStorageKeys(); 320 return session.getSessionStorageKeys();
295 }).chain((keys) { 321 })
296 print(keys); 322 .then((keys) {
297 numkeys = keys.length; 323 numkeys = keys.length;
298 return session.setSessionStorageItem('foo', 'bar'); 324 return session.setSessionStorageItem('foo', 'bar');
299 }).chain((_) { 325 })
300 return session.getSessionStorageKeys(); 326 .then((_) {
301 }).chain((keys) { 327 return session.getSessionStorageKeys();
302 expect(keys.length, equals(numkeys + 1)); 328 })
303 expect(keys, someElement(equals('foo'))); 329 .then((keys) {
304 return session.getSessionStorageCount(); 330 expect(keys.length, equals(numkeys + 1));
305 }).chain((count) { 331 expect(keys, someElement(equals('foo')));
306 expect(count, equals(numkeys + 1)); 332 return session.getSessionStorageCount();
307 return session.getSessionStorageValue('foo'); 333 })
308 }).chain((value) { 334 .then((count) {
309 expect(value, equals('bar')); 335 expect(count, equals(numkeys + 1));
310 return session.deleteSessionStorageValue('foo'); 336 return session.getSessionStorageValue('foo');
311 }).chain((_) { 337 })
312 return session.getSessionStorageKeys(); 338 .then((value) {
313 }).chain((keys) { 339 expect(value, equals('bar'));
314 expect(keys.length, equals(numkeys)); 340 return session.deleteSessionStorageValue('foo');
315 expect(keys, everyElement(isNot(equals('foo')))); 341 })
316 return session.setSessionStorageItem('foo', 'bar'); 342 .then((_) {
317 }).chain((_) { 343 return session.getSessionStorageKeys();
318 return session.clearSessionStorage(); 344 })
319 }).chain((_) { 345 .then((keys) {
320 return session.getSessionStorageKeys(); 346 expect(keys.length, equals(numkeys));
321 }).chain((keys) { 347 expect(keys, everyElement(isNot(equals('foo'))));
322 expect(keys.length, isZero); 348 return session.setSessionStorageItem('foo', 'bar');
323 return session.close(); 349 })
324 }).then((_) { 350 .then((_) {
325 session = null; 351 return session.clearSessionStorage();
326 completionCallback(); 352 })
327 }); 353 .then((_) {
328 }); 354 return session.getSessionStorageKeys();
355 })
356 .then((keys) {
357 expect(keys.length, isZero);
358 return session.close();
359 })
360 .then((_) {
361 session = null;
362 })
363 .catchError(exceptionHandler);
364 });
329 365
330 }); 366 });
331 367
332 group('Script tests', () { 368 group('Script tests', () {
333 setUp(() {
334 completionCallback = expectAsync0((){
335 });
336 });
337
338 // This test is just timing out eventually with a 500 response. 369 // This test is just timing out eventually with a 500 response.
339 370
340 test('Sync script', () { 371 test('Sync script', () {
341 Future f = web_driver.newSession('chrome'); 372 return web_driver.newSession('chrome')
342 f.handleException(exceptionHandler); 373 .then((_session) {
343 f.chain((_session) { 374 session = _session;
344 session = _session; 375 return session.setUrl('http://translate.google.com');
345 return session.setUrl('http://translate.google.com'); 376 })
346 }).chain((_) { 377 .then((_) {
347 return session.execute('function(x, y) { return x * y; }', [2, 3]); 378 return session.execute('return arguments[0] * arguments[1];',
348 }).chain((value) { 379 [2, 3]);
349 expect(value, equals(6)); 380 })
350 return session.close(); 381 .then((value) {
351 }).then((_) { 382 expect(value, equals(6));
352 session = null; 383 return session.close();
353 completionCallback(); 384 })
354 }); 385 .then((_) {
386 session = null;
387 })
388 .catchError(exceptionHandler);
355 }); 389 });
356 }); 390 });
357 391
358 group('Element tests', () { 392 group('Element tests', () {
359 setUp(() {
360 completionCallback = expectAsync0((){
361 });
362 });
363
364 test('Elements', () { 393 test('Elements', () {
365 var w; 394 var w;
366 Future f = web_driver.newSession('chrome'); 395 return web_driver.newSession('chrome')
367 f.handleException(exceptionHandler); 396 .then((_session) {
368 f.chain((_session) { 397 session = _session;
369 session = _session; 398 return session.setUrl('http://duckduckgo.com');
370 return session.setUrl('http://duckduckgo.com'); 399 })
371 }).chain((_) { 400 .then((_) {
372 return session.findElement('id', 'search_form_input_homepage'); 401 return session.findElement('id', 'search_form_input_homepage');
373 }).chain((_w) { 402 })
374 print(_w); 403 .then((_w) {
375 w = _w['ELEMENT']; 404 w = _w['ELEMENT'];
376 return session.sendKeyStrokesToElement(w, 405 return session.sendKeyStrokesToElement(w,
377 [ 'g', 'o', 'o', 'g', 'l', 'e' ]); 406 [ 'g', 'o', 'o', 'g', 'l', 'e' ]);
378 }).chain((_) { 407 })
379 return session.submit(w); 408 .then((_) {
380 }).chain((_) { 409 return session.submit(w);
381 return session.findElements('class name', 'links_zero_click_disambig'); 410 })
382 }).chain((divs) { 411 .then((_) {
383 expect(divs.length, greaterThan(0)); 412 return session.findElements('class name',
384 return session.close(); 413 'links_zero_click_disambig');
385 }).then((_) { 414 })
386 session = null; 415 .then((divs) {
387 completionCallback(); 416 expect(divs.length, greaterThan(0));
388 }); 417 return session.close();
418 })
419 .then((_) {
420 session = null;
421 })
422 .catchError(exceptionHandler);
389 }); 423 });
390 }); 424 });
391 425
392 group('Log tests', () { 426 group('Log tests', () {
393 setUp(() {
394 completionCallback = expectAsync0((){
395 });
396 });
397
398 // Currently, getLogTypes returns a 404, and attempts to get the 427 // Currently, getLogTypes returns a 404, and attempts to get the
399 // logs either return 500 with 'Unknown log type' or 500 with 428 // logs either return 500 with 'Unknown log type' or 500 with
400 // 'Unable to convert logEntries'. 429 // 'Unable to convert logEntries'.
401 430
402 test('Log retrieval', () { 431 test('Log retrieval', () {
403 Future f = web_driver.newSession('chrome'); 432 return web_driver.newSession('firefox')
404 f.handleException(exceptionHandler); 433 .then((_session) {
405 f.chain((_session) { 434 session = _session;
406 session = _session; 435 return session.getLogTypes();
407 return session.getLogTypes(); 436 })
408 }).chain((logTypes) { 437 .then((logTypes) {
409 //print(logTypes); 438 expect(logTypes, someElement(equals('client')));
410 return session.getLogs('driver'); 439 expect(logTypes, someElement(equals('server')));
411 }).chain((logs) { 440 return session.getLogs('driver');
412 //print(logs); 441 })
413 return session.close(); 442 .then((logs) {
414 }).then((_) { 443 expect(logs.length, greaterThan(0));
444 return session.close();
445 })
446 .then((_) {
447 session = null;
448 })
449 .catchError(exceptionHandler);
450 });
451 });
452
453 group('Cleanup', () {
454 test('Cleanup', () {
455 web_driver = null;
456 if (session != null) {
457 var s = session;
415 session = null; 458 session = null;
416 completionCallback(); 459 s.close();
417 }); 460 }
418 }); 461 });
419 }); 462 });
420 } 463 }
421 464
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698