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

Side by Side Diff: LayoutTests/dart/dom/SVGTest2.dart

Issue 9188009: Things to unfork. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 11 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 | « LayoutTests/dart/dom/SVGTest1-expected.txt ('k') | LayoutTests/dart/dom/SVGTest2.html » ('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 #import('../../../../../dart/client/testing/unittest/unittest.dart');
2 #import('dart:dom');
3
4 // Test that SVG elements explicitly implement the IDL interfaces (is-checks
5 // only, see SVGTest3 for behavioural tests).
6
7 main() {
8
9 insertTestDiv() {
10 var element = document.createElement('div');
11 element.innerHTML = @'''
12 <svg id='svg1' width='200' height='100'>
13 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect>
14 </svg>
15 ''';
16 document.body.appendChild(element);
17 return element;
18 }
19
20 forLayoutTests();
21
22 test('rect_isChecks', () {
23 var div = insertTestDiv();
24 var r = document.getElementById('rect1');
25
26 // Direct inheritance chain
27 Expect.isTrue(r is SVGElement);
28 Expect.isTrue(r is Element);
29 Expect.isTrue(r is Node);
30
31 // Other implemented interfaces.
32 Expect.isTrue(r is SVGTests);
33 Expect.isTrue(r is SVGLangSpace);
34 Expect.isTrue(r is SVGExternalResourcesRequired);
35 Expect.isTrue(r is SVGStylable);
36 Expect.isTrue(r is SVGTransformable);
37 Expect.isTrue(r is SVGLocatable);
38
39 // Interfaces not implemented.
40 Expect.isFalse(r is SVGNumber);
41 Expect.isFalse(r is SVGRect);
42 Expect.isFalse(r is SVGSVGElement);
43
44 document.body.removeChild(div);
45 });
46 }
OLDNEW
« no previous file with comments | « LayoutTests/dart/dom/SVGTest1-expected.txt ('k') | LayoutTests/dart/dom/SVGTest2.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698