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

Side by Side Diff: tests/html/form_data_test.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://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 | « tests/html/fileapi_test.dart ('k') | tests/html/form_element_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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('FormDataTest'); 5 library FormDataTest;
6 6
7 #import('../../pkg/unittest/unittest.dart'); 7 import '../../pkg/unittest/lib/unittest.dart';
8 #import('../../pkg/unittest/html_config.dart'); 8 import '../../pkg/unittest/lib/html_config.dart';
9 #import('dart:html'); 9 import 'dart:html';
10 10
11 void main() { 11 void main() {
12 // TODO(efortuna): This is a bad test. Revisit when we have tests that can run 12 // TODO(efortuna): This is a bad test. Revisit when we have tests that can run
13 // both a server and fire up a browser. 13 // both a server and fire up a browser.
14 useHtmlConfiguration(); 14 useHtmlConfiguration();
15 15
16 var isFormData = predicate((x) => x is FormData, 'is a FormData'); 16 var isFormData = predicate((x) => x is FormData, 'is a FormData');
17 17
18 test('constructorTest1', () { 18 test('constructorTest1', () {
19 var form = new FormData(); 19 var form = new FormData();
20 expect(form, isNotNull); 20 expect(form, isNotNull);
21 expect(form, isFormData); 21 expect(form, isFormData);
22 }); 22 });
23 23
24 test('constructorTest2', () { 24 test('constructorTest2', () {
25 var form = new FormData(new FormElement()); 25 var form = new FormData(new FormElement());
26 expect(form, isNotNull); 26 expect(form, isNotNull);
27 expect(form, isFormData); 27 expect(form, isFormData);
28 }); 28 });
29 29
30 test('appendTest', () { 30 test('appendTest', () {
31 var form = new FormData(); 31 var form = new FormData();
32 form.append('test', '1', 'foo'); 32 form.append('test', '1', 'foo');
33 form.append('username', 'Elmo', 'foo'); 33 form.append('username', 'Elmo', 'foo');
34 form.append('address', '1 Sesame Street', 'foo'); 34 form.append('address', '1 Sesame Street', 'foo');
35 form.append('password', '123456', 'foo'); 35 form.append('password', '123456', 'foo');
36 expect(form, isNotNull); 36 expect(form, isNotNull);
37 }); 37 });
38 } 38 }
OLDNEW
« no previous file with comments | « tests/html/fileapi_test.dart ('k') | tests/html/form_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698