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

Unified Diff: tests/html/datalistelement_test.dart

Issue 11667029: Refactoring datalist test to use the supported flag. (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 | « no previous file | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/datalistelement_test.dart
diff --git a/tests/html/datalistelement_test.dart b/tests/html/datalistelement_test.dart
index 7b41aad7ea793977b75d4e00804ea1282ab42072..b7fe7794856e4cfba3a08a58f0be3b3159339113 100644
--- a/tests/html/datalistelement_test.dart
+++ b/tests/html/datalistelement_test.dart
@@ -34,26 +34,36 @@ main() {
document.body.nodes.removeLast();
});
+ // Support is checked in element_types test.
+ var expectation = DataListElement.supported ? returnsNormally : throws;
test('is', () {
+ expect(() {
var list = document.query('#browsers');
expect(list, isDataListElement);
+ }, expectation);
});
test('list', () {
+ expect(() {
var list = document.query('#browsers');
var input = document.query('#input');
expect(input.list, list);
+ }, expectation);
});
test('options', () {
+ expect(() {
var options = document.query('#browsers')
.queryAll('option'); // Uses DataListElement.
expect(options.length, 5);
+ }, expectation);
});
test('create', () {
+ expect(() {
var list = new DataListElement();
expect(list, isDataListElement);
- });
+ }, expectation);
+ });
}
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698