Index: tests/html/svg_test.dart |
diff --git a/tests/html/svg_test.dart b/tests/html/svg_test.dart |
index b24084ac3f648febd5e0648e1eca977ab1d91df0..67b0e2021332994ee14769b142f7a5203b657ccd 100644 |
--- a/tests/html/svg_test.dart |
+++ b/tests/html/svg_test.dart |
@@ -3,6 +3,7 @@ |
// BSD-style license that can be found in the LICENSE file. |
library SVGTest; |
+ |
import 'dart:html'; |
import 'dart:svg' as svg; |
import 'package:unittest/html_individual_config.dart'; |
@@ -17,11 +18,13 @@ main() { |
test('simpleRect', () { |
var div = new Element.tag('div'); |
document.body.append(div); |
- div.setInnerHtml(r''' |
+ div.setInnerHtml( |
+ 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> |
-''', validator: new NodeValidatorBuilder()..allowSvg()); |
+''', |
+ validator: new NodeValidatorBuilder()..allowSvg()); |
var e = document.query('#svg1'); |
expect(e, isNotNull); |
@@ -42,8 +45,7 @@ main() { |
</svg> |
"""); |
- expect(logo, isSvgElement); |
- |
+ expect(logo, isSvgElement); |
}); |
}); |
@@ -52,16 +54,17 @@ main() { |
// only, see SVGTest3 for behavioural tests). |
insertTestDiv() { |
var element = new Element.tag('div'); |
- element.setInnerHtml(r''' |
+ element.setInnerHtml( |
+ 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> |
-''', validator: new NodeValidatorBuilder()..allowSvg()); |
+''', |
+ validator: new NodeValidatorBuilder()..allowSvg()); |
document.body.append(element); |
return element; |
} |
- |
var isElement = predicate((x) => x is Element, 'is an Element'); |
var isSvgElement = predicate((x) => x is svg.SvgElement, 'is a SvgElement'); |
var isSvgSvgElement = |
@@ -71,22 +74,22 @@ main() { |
var isSvgRect = predicate((x) => x is svg.Rect, 'is a svg.Rect'); |
test('rect_isChecks', () { |
- var div = insertTestDiv(); |
- var r = document.query('#rect1'); |
+ var div = insertTestDiv(); |
+ var r = document.query('#rect1'); |
- // Direct inheritance chain |
- expect(r, isSvgElement); |
- expect(r, isElement); |
- expect(r, isNode); |
+ // Direct inheritance chain |
+ expect(r, isSvgElement); |
+ expect(r, isElement); |
+ expect(r, isNode); |
- // Interfaces not implemented. |
- expect(r, isNot(isSvgNumber)); |
- expect(r, isNot(isSvgRect)); |
- expect(r, isNot(isSvgSvgElement)); |
+ // Interfaces not implemented. |
+ expect(r, isNot(isSvgNumber)); |
+ expect(r, isNot(isSvgRect)); |
+ expect(r, isNot(isSvgSvgElement)); |
- div.remove(); |
- }); |
+ div.remove(); |
}); |
+ }); |
insertTestDiv() { |
var element = new Element.tag('div'); |
@@ -100,7 +103,6 @@ main() { |
} |
group('svgBehavioral', () { |
- |
// Test that SVG elements have the operations advertised through all the IDL |
// interfaces. This is a 'duck typing' test, and does not explicitly use |
// 'is' checks on the expected interfaces (that is in the test group above). |
@@ -113,13 +115,12 @@ main() { |
var isSvgAnimatedString = |
predicate((x) => x is svg.AnimatedString, 'is an svg.AnimatedString'); |
var isSvgRect = predicate((x) => x is svg.Rect, 'is a svg.Rect'); |
- var isSvgAnimatedTransformList = |
- predicate((x) => x is svg.AnimatedTransformList, |
- 'is an svg.AnimatedTransformList'); |
+ var isSvgAnimatedTransformList = predicate( |
+ (x) => x is svg.AnimatedTransformList, |
+ 'is an svg.AnimatedTransformList'); |
var isCssStyleDeclaration = |
predicate((x) => x is CssStyleDeclaration, 'is a CssStyleDeclaration'); |
- |
testRect(name, checker) { |
test(name, () { |
var div = insertTestDiv(); |
@@ -129,5 +130,4 @@ main() { |
}); |
} |
}); |
- |
} |