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

Unified Diff: tests/html/datalistelement_test.dart

Issue 10824326: Enable (HTML)DataListElement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« lib/dom/dom.dart ('K') | « lib/html/dartium/html_dartium.dart ('k') | no next file » | 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
new file mode 100644
index 0000000000000000000000000000000000000000..e13015233968e1f5014dbd3326730b44f2ca14da
--- /dev/null
+++ b/tests/html/datalistelement_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('datalistelement_dataview_test');
+#import('../../pkg/unittest/unittest.dart');
+#import('../../pkg/unittest/html_config.dart');
+#import('dart:html');
+
+main() {
+ useHtmlConfiguration();
+
+ var div;
+
+ setUp(() {
+ div = new DivElement();
+ document.body.nodes.add(div);
+ div.innerHTML = """
+<input id="input" list="browsers" />
+<datalist id="browsers">
+ <option value="Chrome">
+ <option value="Firefox">
+ <option value="Internet Explorer">
+ <option value="Opera">
+ <option value="Safari">
+</datalist>
+""";
+ });
+
+ tearDown(() {
+ document.body.nodes.removeLast();
+ });
+
+
+ test('is', () {
+ var list = document.query('#browsers');
+ expect(list is DataListElement);
+ });
+
+ test('list', () {
+ var list = document.query('#browsers');
+ var input = document.query('#input');
+ expect(input.list, list);
+ });
+
+ test('options', () {
+ var options = document.query('#browsers')
+ .queryAll('option'); // Uses DataListElement.
+ expect(options.length, 5);
+ });
+
+ test('create', () {
+ var list = new DataListElement();
+ expect(list is DataListElement);
+ });
+}
« lib/dom/dom.dart ('K') | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698