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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Put universally passing event constructors in this file.
6 // Move constructors that fail on some configuration to their own
7 // element_constructor_foo_test.dart file.
8
9 #library('ElementConstructorTest');
10 #import('../../lib/unittest/unittest.dart');
11 #import('../../lib/unittest/html_config.dart');
12 #import('dart:html');
13
14 main() {
15 useHtmlConfiguration();
16
17 test('anchor1', () {
18 var e = new AnchorElement();
19 Expect.isTrue(e is AnchorElement);
20 });
21
22 test('anchor2', () {
23 var e = new AnchorElement(href: '#blah');
24 Expect.isTrue(e is AnchorElement);
25 Expect.isTrue(e.href.endsWith('#blah'));
26 });
27
28 test('area', () {
29 var e = new AreaElement();
30 Expect.isTrue(e is AreaElement);
31 });
32
33 // AudioElement tested in audioelement_test.dart
34
35 test('div', () {
36 var e = new DivElement();
37 Expect.isTrue(e is DivElement);
38 });
39
40 test('canvas1', () {
41 var e = new CanvasElement();
42 Expect.isTrue(e is CanvasElement);
43 });
44
45 test('canvas2', () {
46 var e = new CanvasElement(height: 100, width: 200);
47 Expect.isTrue(e is CanvasElement);
48 Expect.equals(200, e.width);
49 Expect.equals(100, e.height);
50 });
51
52 test('p', () {
53 var e = new ParagraphElement();
54 Expect.isTrue(e is ParagraphElement);
55 });
56
57 test('span', () {
58 var e = new SpanElement();
59 Expect.isTrue(e is SpanElement);
60 });
61 }
OLDNEW
« 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