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

Unified Diff: tests/html/input_element_test.dart

Issue 11691005: Revert "Filling in supported platforms for InputElement types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/input_element_test.dart
diff --git a/tests/html/input_element_test.dart b/tests/html/input_element_test.dart
index c4946cf6944a22dd49df57f15a2c3b0aeb38e209..d8c80ce1730ee39f1c32a156e2b920428be8ac8e 100644
--- a/tests/html/input_element_test.dart
+++ b/tests/html/input_element_test.dart
@@ -3,155 +3,152 @@ import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
-void check(InputElement element, String type, [bool supported = true]) {
- expect(element is InputElement, true);
- if (supported) {
- expect(element.type, type);
- } else {
- expect(element.type, 'text');
- }
-}
-
main() {
useHtmlIndividualConfiguration();
- group('supported_datetime', () {
- test('supported', () {
- expect(DateTimeInputElement.supported, true);
- });
+ test('hidden', () {
+ var e = new HiddenInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'hidden');
});
- group('supported_date', () {
- test('supported', () {
- expect(DateInputElement.supported, true);
- });
+ test('search', () {
+ var e = new SearchInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'search');
});
- group('supported_month', () {
- test('supported', () {
- expect(MonthInputElement.supported, true);
- });
+ test('text', () {
+ var e = new TextInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'text');
});
- group('supported_week', () {
- test('supported', () {
- expect(WeekInputElement.supported, true);
- });
+ test('url', () {
+ var e = new UrlInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'url');
});
- group('supported_time', () {
- test('supported', () {
- expect(TimeInputElement.supported, true);
- });
+ test('telephone', () {
+ var e = new TelephoneInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'tel');
});
- group('supported_datetime-local', () {
- test('supported', () {
- expect(LocalDateTimeInputElement.supported, true);
- });
+ test('email', () {
+ var e = new EmailInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'email');
});
- group('supported_number', () {
- test('supported', () {
- expect(NumberInputElement.supported, true);
- });
+ test('password', () {
+ var e = new PasswordInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'password');
});
- group('supported_range', () {
- test('supported', () {
- expect(RangeInputElement.supported, true);
+ group('datetime', () {
+ test('constructor', () {
+ var e = new DateTimeInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'datetime');
});
});
- group('constructors', () {
- test('hidden', () {
- check(new HiddenInputElement(), 'hidden');
- });
-
- test('search', () {
- check(new SearchInputElement(), 'search');
- });
-
- test('text', () {
- check(new TextInputElement(), 'text');
- });
-
- test('url', () {
- check(new UrlInputElement(), 'url');
- });
-
- test('telephone', () {
- check(new TelephoneInputElement(), 'tel');
- });
-
- test('email', () {
- check(new EmailInputElement(), 'email');
- });
-
- test('password', () {
- check(new PasswordInputElement(), 'password');
- });
-
- test('datetime', () {
- check(new DateTimeInputElement(), 'datetime',
- DateTimeInputElement.supported);
- });
-
- test('date', () {
- check(new DateInputElement(), 'date', DateInputElement.supported);
+ group('date', () {
+ test('constructor', () {
+ var e = new DateInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'date');
});
+ });
- test('month', () {
- check(new MonthInputElement(), 'month', MonthInputElement.supported);
+ group('month', () {
+ test('constructor', () {
+ var e = new MonthInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'month');
});
+ });
- test('week', () {
- check(new WeekInputElement(), 'week', WeekInputElement.supported);
+ group('week', () {
+ test('constructor', () {
+ var e = new WeekInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'week');
});
+ });
- test('time', () {
- check(new TimeInputElement(), 'time', TimeInputElement.supported);
+ group('time', () {
+ test('constructor', () {
+ var e = new TimeInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'time');
});
+ });
- test('datetime-local', () {
- check(new LocalDateTimeInputElement(), 'datetime-local',
- LocalDateTimeInputElement.supported);
+ group('datetime-local', () {
+ test('constructor', () {
+ var e = new LocalDateTimeInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'datetime-local');
});
+ });
- test('number', () {
- check(new NumberInputElement(), 'number', NumberInputElement.supported);
- });
+ test('number', () {
+ var e = new NumberInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'number');
+ });
- test('range', () {
- check(new RangeInputElement(), 'range', RangeInputElement.supported);
+ group('range', () {
+ test('constructor', () {
+ var e = new RangeInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'range');
});
+ });
- test('checkbox', () {
- check(new CheckboxInputElement(), 'checkbox');
- });
+ test('checkbox', () {
+ var e = new CheckboxInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'checkbox');
+ });
- test('radio', () {
- check(new RadioButtonInputElement(), 'radio');
- });
+ test('radio', () {
+ var e = new RadioButtonInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'radio');
+ });
- test('file', () {
- check(new FileUploadInputElement(), 'file');
- });
+ test('file', () {
+ var e = new FileUploadInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'file');
+ });
- test('submit', () {
- check(new SubmitButtonInputElement(), 'submit');
- });
+ test('submit', () {
+ var e = new SubmitButtonInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'submit');
+ });
- test('image', () {
- check(new ImageButtonInputElement(), 'image');
- });
+ test('image', () {
+ var e = new ImageButtonInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'image');
+ });
- test('reset', () {
- check(new ResetButtonInputElement(), 'reset');
- });
+ test('reset', () {
+ var e = new ResetButtonInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'reset');
+ });
- test('button', () {
- check(new ButtonInputElement(), 'button');
- });
+ test('button', () {
+ var e = new ButtonInputElement();
+ expect(e is InputElement, true);
+ expect(e.type, 'button');
});
}
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698