From 41fbcd4c5d055684792e63d4c0d64a40cb748c7d Mon Sep 17 00:00:00 2001 From: "blois@google.com" Date: Sat, 29 Dec 2012 00:33:24 +0000 Subject: [PATCH] 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 --- tests/html/datalistelement_test.dart | 12 +++++++++++- tests/html/html.status | 3 --- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/html/datalistelement_test.dart b/tests/html/datalistelement_test.dart index 7b41aad7ea7..b7fe7794856 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); + }); } diff --git a/tests/html/html.status b/tests/html/html.status index 4fd90ae7329..f48eee278dd 100644 --- a/tests/html/html.status +++ b/tests/html/html.status @@ -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 ]