Refactoring datalist test to use the supported flag.

I added this flag as part of previous element refactoring, fixing the test to use it.

BUG=

Review URL: https://codereview.chromium.org//11667029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16566 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
blois@google.com
2012-12-29 00:33:24 +00:00
parent f966c0e0b4
commit 41fbcd4c5d
2 changed files with 11 additions and 4 deletions
+11 -1
View File
@@ -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);
});
}
-3
View File
@@ -133,7 +133,6 @@ audiocontext_test: Fail
blob_constructor_test: Fail
cache_test: fail # IE9 does not support ApplicationCache, but IE 10 does (and should work).
css_test: Fail
datalistelement_test: Fail # ie9 does not have HTMLDataListElement
dom_constructors_test: Fail
element_test/additionalConstructors: Fail
exceptions_test: Fail
@@ -186,10 +185,8 @@ input_element_test/supported_range: Fail, Crash # TODO(efortuna): Please tria
input_element_test/supported_time: Fail, Crash
input_element_test/supported_week: Fail, Crash
fileapi_test: Fail # requestFileSystem not supported in Safari 6.
datalistelement_test: Fail # HTMLDataListElement not yet supported in Safari.
# TODO(efortuna): Make our test framework able to separate tests out by browser
# version.
datalistelement_test: Fail # Issue: 7414
node_test: Skip # Issue 6457
[ $runtime == opera && $system == windows ]