| Index: tests/html/svg_2_test.dart
|
| ===================================================================
|
| --- tests/html/svg_2_test.dart (revision 14114)
|
| +++ tests/html/svg_2_test.dart (working copy)
|
| @@ -26,22 +26,28 @@
|
| var r = document.query('#rect1');
|
|
|
| // Direct inheritance chain
|
| - Expect.isTrue(r is SVGElement);
|
| - Expect.isTrue(r is Element);
|
| - Expect.isTrue(r is Node);
|
| + expect(r, new isInstanceOf<SVGElement>('SVGElement'));
|
| + expect(r, new isInstanceOf<Element>('Element'));
|
| + expect(r, new isInstanceOf<Node>('Node'));
|
|
|
| // Other implemented interfaces.
|
| - Expect.isTrue(r is SVGTests);
|
| - Expect.isTrue(r is SVGLangSpace);
|
| - Expect.isTrue(r is SVGExternalResourcesRequired);
|
| - Expect.isTrue(r is SVGStylable);
|
| - Expect.isTrue(r is SVGTransformable);
|
| - Expect.isTrue(r is SVGLocatable);
|
| + expect(r, new isInstanceOf<SVGTests>('SVGTests'));
|
| + expect(r, new isInstanceOf<SVGLangSpace>('SVGLangSpace'));
|
| + expect(r, new isInstanceOf<SVGExternalResourcesRequired>(
|
| + 'SVGExternalResourcesRequired'));
|
| + expect(r, new isInstanceOf<SVGStylable>('SVGStylable'));
|
| + expect(r, new isInstanceOf<SVGTransformable>('SVGTransformable'));
|
| + expect(r, new isInstanceOf<SVGLocatable>('SVGLocatable'));
|
|
|
| // Interfaces not implemented.
|
| - Expect.isFalse(r is SVGNumber);
|
| - Expect.isFalse(r is SVGRect);
|
| - Expect.isFalse(r is SVGSVGElement);
|
| + // TODO(gram): use this version when dart2js handles 'is' properly.
|
| + // expect(r, isNot(new isInstanceOf<SVGNumber>('SVGNumber')));
|
| + expect(r is! SVGNumber, isTrue);
|
| + // TODO(gram): use this version when dart2js handles 'is' properly.
|
| + // expect(r, isNot(new isInstanceOf<SVGRect>('SVGRect')));
|
| + expect(r is! SVGRect, isTrue);
|
| + expect(r,
|
| + isNot(new isInstanceOf<SVGSVGElement>('SVGSVGElement')));
|
|
|
| div.remove();
|
| });
|
|
|