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

Unified Diff: tests/html/element_constructor_1_test.dart

Issue 10384024: Element constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 7 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
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/element_constructor_1_test.dart
diff --git a/tests/html/element_constructor_1_test.dart b/tests/html/element_constructor_1_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..70e1b7472c802969be334158557fbee142de6b26
--- /dev/null
+++ b/tests/html/element_constructor_1_test.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2011, 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.
+
+// Put universally passing event constructors in this file.
+// Move constructors that fail on some configuration to their own
+// element_constructor_foo_test.dart file.
+
+#library('ElementConstructorTest');
+#import('../../lib/unittest/unittest.dart');
+#import('../../lib/unittest/html_config.dart');
+#import('dart:html');
+
+main() {
+ useHtmlConfiguration();
+
+ test('anchor1', () {
+ var e = new AnchorElement();
+ Expect.isTrue(e is AnchorElement);
+ });
+
+ test('anchor2', () {
+ var e = new AnchorElement(href: '#blah');
+ Expect.isTrue(e is AnchorElement);
+ Expect.isTrue(e.href.endsWith('#blah'));
+ });
+
+ test('area', () {
+ var e = new AreaElement();
+ Expect.isTrue(e is AreaElement);
+ });
+
+ // AudioElement tested in audioelement_test.dart
+
+ test('div', () {
+ var e = new DivElement();
+ Expect.isTrue(e is DivElement);
+ });
+
+ test('canvas1', () {
+ var e = new CanvasElement();
+ Expect.isTrue(e is CanvasElement);
+ });
+
+ test('canvas2', () {
+ var e = new CanvasElement(height: 100, width: 200);
+ Expect.isTrue(e is CanvasElement);
+ Expect.equals(200, e.width);
+ Expect.equals(100, e.height);
+ });
+
+ test('p', () {
+ var e = new ParagraphElement();
+ Expect.isTrue(e is ParagraphElement);
+ });
+
+ test('span', () {
+ var e = new SpanElement();
+ Expect.isTrue(e is SpanElement);
+ });
+}
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698