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

Unified Diff: tests/html/svg_test.dart

Issue 16374007: First rev of Safe DOM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/safe_dom_test.dart ('k') | tests/html/svgelement_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/svg_test.dart
diff --git a/tests/html/svg_test.dart b/tests/html/svg_test.dart
index db3180738dbf3a2a57a939d94f74597a9dd6f63d..b24084ac3f648febd5e0648e1eca977ab1d91df0 100644
--- a/tests/html/svg_test.dart
+++ b/tests/html/svg_test.dart
@@ -3,10 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
library SVGTest;
-import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
import 'dart:svg' as svg;
+import 'package:unittest/html_individual_config.dart';
+import 'package:unittest/unittest.dart';
main() {
useHtmlIndividualConfiguration();
@@ -17,12 +17,11 @@ main() {
test('simpleRect', () {
var div = new Element.tag('div');
document.body.append(div);
- div.innerHtml = 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());
var e = document.query('#svg1');
expect(e, isNotNull);
@@ -53,11 +52,11 @@ main() {
// only, see SVGTest3 for behavioural tests).
insertTestDiv() {
var element = new Element.tag('div');
- element.innerHtml = 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());
document.body.append(element);
return element;
}
« no previous file with comments | « tests/html/safe_dom_test.dart ('k') | tests/html/svgelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698