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

Unified Diff: tests/html/svg_2_test.dart

Issue 12082122: Add supported checks to the SVG library, and library cleanup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/svg_1_test.dart ('k') | tests/html/svg_3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/svg_2_test.dart
diff --git a/tests/html/svg_2_test.dart b/tests/html/svg_2_test.dart
deleted file mode 100644
index b2c4547ad4dae536af53ac46d2f157a4c2139a2f..0000000000000000000000000000000000000000
--- a/tests/html/svg_2_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-library SVG2Test;
-import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
-import 'dart:html';
-import 'dart:svg' as svg;
-
-// Test that SVG elements explicitly implement the IDL interfaces (is-checks
-// only, see SVGTest3 for behavioural tests).
-
-main() {
-
- insertTestDiv() {
- var element = new Element.tag('div');
- element.innerHtml = r'''
-<svg id='svg1' width='200' height='100'>
-<rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect>
-</svg>
-''';
- document.body.nodes.add(element);
- return element;
- }
-
- useHtmlConfiguration();
-
- var isElement = predicate((x) => x is Element, 'is an Element');
- var isSvgElement = predicate((x) => x is svg.SvgElement, 'is a SvgElement');
- var isSvgSvgElement =
- predicate((x) => x is svg.SvgSvgElement, 'is a SvgSvgElement');
- var isNode = predicate((x) => x is Node, 'is a Node');
- var isSvgTests = predicate((x) => x is svg.Tests, 'is a svg.Tests');
- var isSvgLangSpace = predicate((x) => x is svg.LangSpace, 'is a svg.LangSpace');
- var isSvgExternalResourcesRequired =
- predicate((x) => x is svg.ExternalResourcesRequired,
- 'is a svg.ExternalResourcesRequired');
- var isSvgTransformable =
- predicate((x) => x is svg.Transformable, 'is a svg.Transformable');
- var isSvgLocatable =
- predicate((x) => x is svg.Locatable, 'is a svg.Locatable');
- var isSvgNumber = predicate((x) => x is svg.Number, 'is a svg.Number');
- var isSvgRect = predicate((x) => x is svg.Rect, 'is a svg.Rect');
-
- test('rect_isChecks', () {
- var div = insertTestDiv();
- var r = document.query('#rect1');
-
- // Direct inheritance chain
- expect(r, isSvgElement);
- expect(r, isElement);
- expect(r, isNode);
-
- // Other implemented interfaces.
- expect(r, isSvgTests);
- expect(r, isSvgLangSpace);
- expect(r, isSvgExternalResourcesRequired);
- expect(r, isSvgTransformable);
- expect(r, isSvgLocatable);
-
- // Interfaces not implemented.
- expect(r, isNot(isSvgNumber));
- expect(r, isNot(isSvgRect));
- expect(r, isNot(isSvgSvgElement));
-
- div.remove();
- });
-}
« no previous file with comments | « tests/html/svg_1_test.dart ('k') | tests/html/svg_3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698