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

Unified Diff: tests/html/svgelement_test.dart

Issue 11368128: Take 2 of splitting html tests into subtests. Had to make two changes to drt to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
Index: tests/html/svgelement_test.dart
===================================================================
--- tests/html/svgelement_test.dart (revision 14667)
+++ tests/html/svgelement_test.dart (working copy)
@@ -4,11 +4,11 @@
library SVGElementTest;
import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
main() {
- useHtmlConfiguration();
+ useHtmlIndividualConfiguration();
var isSVGSVGElement =
predicate((x) => x is SVGSVGElement, 'is a SVGSVGElement');
@@ -33,8 +33,7 @@
new SVGElement.svg('<$tagName></$tagName>')), isTrue);
});
}
-
- group('constructors', () {
+ group('additionalConstructors', () {
group('svg', () {
test('valid', () {
final svg = """
@@ -61,8 +60,6 @@
throwsArgumentError);
});
});
-
- testConstructor('a', (e) => e is SVGAElement);
testConstructor('altGlyphDef', (e) => e is SVGAltGlyphDefElement);
testConstructor('altGlyph', (e) => e is SVGAltGlyphElement);
testConstructor('animateColor', (e) => e is SVGAnimateColorElement);
@@ -70,12 +67,7 @@
// WebKit doesn't recognize animateMotion
// testConstructor('animateMotion', (e) => e is SVGAnimateMotionElement);
testConstructor('animateTransform', (e) => e is SVGAnimateTransformElement);
- testConstructor('circle', (e) => e is SVGCircleElement);
- testConstructor('clipPath', (e) => e is SVGClipPathElement);
testConstructor('cursor', (e) => e is SVGCursorElement);
- testConstructor('defs', (e) => e is SVGDefsElement);
- testConstructor('desc', (e) => e is SVGDescElement);
- testConstructor('ellipse', (e) => e is SVGEllipseElement);
testConstructor('feBlend', (e) => e is SVGFEBlendElement);
testConstructor('feColorMatrix', (e) => e is SVGFEColorMatrixElement);
testConstructor('feComponentTransfer',
@@ -111,9 +103,23 @@
testConstructor('font-face-src', (e) => e is SVGFontFaceSrcElement);
testConstructor('font-face-uri', (e) => e is SVGFontFaceUriElement);
testConstructor('foreignObject', (e) => e is SVGForeignObjectElement);
- testConstructor('g', (e) => e is SVGGElement);
testConstructor('glyph', (e) => e is SVGGlyphElement);
testConstructor('glyphRef', (e) => e is SVGGlyphRefElement);
+ testConstructor('metadata', (e) => e is SVGMetadataElement);
+ testConstructor('missing-glyph', (e) => e is SVGMissingGlyphElement);
+ testConstructor('set', (e) => e is SVGSetElement);
+ testConstructor('tref', (e) => e is SVGTRefElement);
+ testConstructor('vkern', (e) => e is SVGVKernElement);
+ });
+
+ group('constructors', () {
+ testConstructor('a', (e) => e is SVGAElement);
+ testConstructor('circle', (e) => e is SVGCircleElement);
+ testConstructor('clipPath', (e) => e is SVGClipPathElement);
+ testConstructor('defs', (e) => e is SVGDefsElement);
+ testConstructor('desc', (e) => e is SVGDescElement);
+ testConstructor('ellipse', (e) => e is SVGEllipseElement);
+ testConstructor('g', (e) => e is SVGGElement);
// WebKit doesn't recognize hkern
// testConstructor('hkern', (e) => e is SVGHKernElement);
testConstructor('image', (e) => e is SVGImageElement);
@@ -123,8 +129,6 @@
// testConstructor('mpath', (e) => e is SVGMPathElement);
testConstructor('marker', (e) => e is SVGMarkerElement);
testConstructor('mask', (e) => e is SVGMaskElement);
- testConstructor('metadata', (e) => e is SVGMetadataElement);
- testConstructor('missing-glyph', (e) => e is SVGMissingGlyphElement);
testConstructor('path', (e) => e is SVGPathElement);
testConstructor('pattern', (e) => e is SVGPatternElement);
testConstructor('polygon', (e) => e is SVGPolygonElement);
@@ -132,27 +136,26 @@
testConstructor('radialGradient', (e) => e is SVGRadialGradientElement);
testConstructor('rect', (e) => e is SVGRectElement);
testConstructor('script', (e) => e is SVGScriptElement);
- testConstructor('set', (e) => e is SVGSetElement);
testConstructor('stop', (e) => e is SVGStopElement);
testConstructor('style', (e) => e is SVGStyleElement);
testConstructor('switch', (e) => e is SVGSwitchElement);
testConstructor('symbol', (e) => e is SVGSymbolElement);
- testConstructor('tref', (e) => e is SVGTRefElement);
testConstructor('tspan', (e) => e is SVGTSpanElement);
testConstructor('text', (e) => e is SVGTextElement);
testConstructor('textPath', (e) => e is SVGTextPathElement);
testConstructor('title', (e) => e is SVGTitleElement);
testConstructor('use', (e) => e is SVGUseElement);
- testConstructor('vkern', (e) => e is SVGVKernElement);
testConstructor('view', (e) => e is SVGViewElement);
});
- test('outerHTML', () {
- final el = new SVGSVGElement();
- el.elements.add(new SVGElement.tag("circle"));
- el.elements.add(new SVGElement.tag("path"));
- expect(el.outerHTML,
- '<svg version="1.1"><circle></circle><path></path></svg>');
+ group('outerHTML', () {
+ test('outerHTML', () {
+ final el = new SVGSVGElement();
+ el.elements.add(new SVGElement.tag("circle"));
+ el.elements.add(new SVGElement.tag("path"));
+ expect(el.outerHTML,
+ '<svg version="1.1"><circle></circle><path></path></svg>');
+ });
});
group('innerHTML', () {
@@ -172,7 +175,7 @@
});
});
- group('elements', () {
+ group('elementget', () {
test('get', () {
final el = new SVGElement.svg("""
<svg version="1.1">
@@ -182,7 +185,9 @@
</svg>""");
expect(_nodeStrings(el.elements), ["circle", "path"]);
});
+ });
+ group('elementset', () {
test('set', () {
final el = new SVGSVGElement();
el.elements = [new SVGElement.tag("circle"), new SVGElement.tag("path")];

Powered by Google App Engine
This is Rietveld 408576698