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

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

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
OLDNEW
1 #library('SVG1Test'); 1 #library('SVG1Test');
2 #import('../../../testing/unittest/unittest.dart'); 2 #import('../../../testing/unittest/unittest_dom.dart');
3 #import('dart:dom'); 3 #import('dart:dom');
4 4
5 // Test that SVG is present in dart:dom API 5 // Test that SVG is present in dart:dom API
6 6
7 main() { 7 main() {
8 forLayoutTests(); 8 forLayoutTests();
9 9
10 test('simpleRect', () { 10 test('simpleRect', () {
11 var div = document.createElement('div'); 11 var div = document.createElement('div');
12 document.body.appendChild(div); 12 document.body.appendChild(div);
13 div.innerHTML = @''' 13 div.innerHTML = @'''
14 <svg id='svg1' width='200' height='100'> 14 <svg id='svg1' width='200' height='100'>
15 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect> 15 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect>
16 </svg> 16 </svg>
17 '''; 17 ''';
18 18
19 var e = document.getElementById('svg1'); 19 var e = document.getElementById('svg1');
20 Expect.isTrue(e != null); 20 Expect.isTrue(e != null);
21 21
22 SVGRectElement r = document.getElementById('rect1'); 22 SVGRectElement r = document.getElementById('rect1');
23 Expect.equals(10, r.x.baseVal.value); 23 Expect.equals(10, r.x.baseVal.value);
24 Expect.equals(20, r.y.baseVal.value); 24 Expect.equals(20, r.y.baseVal.value);
25 Expect.equals(40, r.height.baseVal.value); 25 Expect.equals(40, r.height.baseVal.value);
26 Expect.equals(130, r.width.baseVal.value); 26 Expect.equals(130, r.width.baseVal.value);
27 Expect.equals(5, r.rx.baseVal.value); 27 Expect.equals(5, r.rx.baseVal.value);
28 }); 28 });
29 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698