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

Side by Side Diff: client/tests/client/dom/WrapperTest.dart

Issue 9314008: Migrate all LayoutTests/dart/dom to main repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update config file Created 8 years, 10 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 | « client/tests/client/dom/WindowOpenTest.dart ('k') | client/tests/client/dom/XHRTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #library('WrapperTest');
2 #import('../../../testing/unittest/unittest.dart');
3 #import('dart:dom');
4
5 main() {
6 HTMLCanvasElement canvas;
7 CanvasRenderingContext2D context;
8
9 // FIXME: once main is run on content loaded, this hack won't be necessary.
10 window.setTimeout(() {
11 canvas = document.createElement('canvas');
12 canvas.id = 'canvas';
13 canvas.setAttribute('width', '100');
14 canvas.setAttribute('height', '100');
15 document.body.appendChild(canvas);
16 context = canvas.getContext('2d');
17 }, 0);
18
19 forLayoutTests();
20 test('DomType', () {
21 Expect.isTrue(canvas is DOMType);
22 Expect.isTrue(context is DOMType);
23 });
24 test('ObjectLocalStorage', () {
25 final element = document.getElementById('canvas');
26 element.dartObjectLocalStorage = 42;
27
28 Expect.equals(42, canvas.dynamic.dartObjectLocalStorage);
29 });
30 test('TypeName', () {
31 final element = document.getElementById('canvas');
32 Expect.stringEquals('HTMLCanvasElement', element.typeName);
33 Expect.stringEquals('HTMLCanvasElement', canvas.dynamic.typeName);
34 Expect.stringEquals('CanvasRenderingContext2D', context.dynamic.typeName);
35 });
36 }
OLDNEW
« no previous file with comments | « client/tests/client/dom/WindowOpenTest.dart ('k') | client/tests/client/dom/XHRTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698