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

Unified Diff: tests/html/svgelement_test.dart

Issue 11576060: Fixing up some Element and SvgElement tests to make them more platform-independent (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/svgelement_test.dart
diff --git a/tests/html/svgelement_test.dart b/tests/html/svgelement_test.dart
index 3b3a2f4a7afabfb49e513a15413451fd5d2ff051..333bca8f00154826b37ab029c808294ac53bb8ff 100644
--- a/tests/html/svgelement_test.dart
+++ b/tests/html/svgelement_test.dart
@@ -154,8 +154,11 @@ main() {
final el = new svg.SvgSvgElement();
el.children.add(new svg.CircleElement());
el.children.add(new svg.PathElement());
- expect(el.outerHtml,
- '<svg version="1.1"><circle></circle><path></path></svg>');
+ expect([
+ '<svg version="1.1"><circle></circle><path></path></svg>',
+ '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">'
+ '<circle /><path /></svg>',
+ ].contains(el.outerHtml), true);
});
});
@@ -164,7 +167,12 @@ main() {
final el = new svg.SvgSvgElement();
el.children.add(new svg.CircleElement());
el.children.add(new svg.PathElement());
- expect(el.innerHtml, '<circle></circle><path></path>');
+ // Allow for odd IE serialization.
+ expect([
+ '<circle></circle><path></path>',
+ '<circle xmlns="http://www.w3.org/2000/svg" />'
Emily Fortuna 2012/12/18 18:47:15 Is this something we could add automatically in ou
blois 2012/12/18 20:50:04 It's optional- IE includes the xmlns while Chrome
+ '<path xmlns="http://www.w3.org/2000/svg" />'
+ ].contains(el.innerHtml), true);
});
test('set', () {
@@ -206,7 +214,9 @@ main() {
test('set', () {
final el = new svg.SvgSvgElement();
el.children = [new svg.SvgElement.tag("circle"), new svg.SvgElement.tag("path")];
- expect(el.innerHtml, '<circle></circle><path></path>');
+ expect(el.nodes.length, 2);
+ expect(el.nodes[0] is svg.CircleElement, true);
+ expect(el.nodes[1] is svg.PathElement, true);
});
});
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698