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

Unified Diff: tests/html/svg_1_test.dart

Issue 10982002: Fixing creating SVG elements with trailing newlines. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « samples/logo/logo.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/svg_1_test.dart
diff --git a/tests/html/svg_1_test.dart b/tests/html/svg_1_test.dart
index 9f33bb91ece3fb8991107d0abdaec2010439099d..df542546d3081d2c49921c90a4695b7d06d09819 100644
--- a/tests/html/svg_1_test.dart
+++ b/tests/html/svg_1_test.dart
@@ -15,6 +15,7 @@ main() {
<svg id='svg1' width='200' height='100'>
<rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect>
</svg>
+
''';
var e = document.query('#svg1');
@@ -27,4 +28,16 @@ main() {
Expect.equals(130, r.width.baseVal.value);
Expect.equals(5, r.rx.baseVal.value);
});
+
+ test('trailing newline', () {
+ // Ensures that we handle SVG with trailing newlines.
+ var logo = new SVGElement.svg("""
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <path/>
+ </svg>
+ """);
+
+ expect(logo is SVGElement, true);
+
+ });
}
« no previous file with comments | « samples/logo/logo.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698