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

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

Issue 12391052: Enable tests. (Closed) Base URL: https://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
« no previous file with comments | « tests/html/fileapi_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library input_element_test; 1 library input_element_test;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_individual_config.dart'; 3 import '../../pkg/unittest/lib/html_individual_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 void check(InputElement element, String type, [bool supported = true]) { 6 void check(InputElement element, String type, [bool supported = true]) {
7 expect(element is InputElement, true); 7 expect(element is InputElement, true);
8 if (supported) { 8 if (supported) {
9 expect(element.type, type); 9 expect(element.type, type);
10 } else { 10 } else {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 check(new MonthInputElement(), 'month', MonthInputElement.supported); 119 check(new MonthInputElement(), 'month', MonthInputElement.supported);
120 }); 120 });
121 121
122 test('week', () { 122 test('week', () {
123 check(new WeekInputElement(), 'week', WeekInputElement.supported); 123 check(new WeekInputElement(), 'week', WeekInputElement.supported);
124 }); 124 });
125 125
126 test('time', () { 126 test('time', () {
127 check(new TimeInputElement(), 'time', TimeInputElement.supported); 127 check(new TimeInputElement(), 'time', TimeInputElement.supported);
128 if (TimeInputElement.supported) { 128 if (TimeInputElement.supported) {
129 // Bug 8836 Re-enable once Dartium supports DateTime properties. 129 var element = new TimeInputElement();
130 // var element = new TimeInputElement(); 130 var now = new DateTime.now();
131 // var now = new DateTime.now(); 131 element.valueAsDate = now;
132 // element.valueAsDate = now; 132 expect(element.valueAsDate is DateTime, isTrue);
133 // expect(element.valueAsDate is DateTime, isTrue);
134 133
135 // Bug 8813, setting it is just going to the epoch. 134 // Bug 8813, setting it is just going to the epoch.
136 //expect(element.valueAsDate, now); 135 //expect(element.valueAsDate, now);
137 } 136 }
138 }); 137 });
139 138
140 test('datetime-local', () { 139 test('datetime-local', () {
141 check(new LocalDateTimeInputElement(), 'datetime-local', 140 check(new LocalDateTimeInputElement(), 'datetime-local',
142 LocalDateTimeInputElement.supported); 141 LocalDateTimeInputElement.supported);
143 }); 142 });
(...skipping 28 matching lines...) Expand all
172 171
173 test('reset', () { 172 test('reset', () {
174 check(new ResetButtonInputElement(), 'reset'); 173 check(new ResetButtonInputElement(), 'reset');
175 }); 174 });
176 175
177 test('button', () { 176 test('button', () {
178 check(new ButtonInputElement(), 'button'); 177 check(new ButtonInputElement(), 'button');
179 }); 178 });
180 }); 179 });
181 } 180 }
OLDNEW
« no previous file with comments | « tests/html/fileapi_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698