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

Unified Diff: tests/html/svgelement_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/svg_test.dart ('k') | tests/html/utils.dart » ('j') | 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 f94baaef7c09c1e2fcc2e9fdcb0306a3e43ec0d9..1dad882f4ca89342e4f455db4c360242766343c4 100644
--- a/tests/html/svgelement_test.dart
+++ b/tests/html/svgelement_test.dart
@@ -3,11 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
library SvgElementTest;
-import "package:expect/expect.dart";
-import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
import 'dart:svg' as svg;
+import 'package:expect/expect.dart';
+import 'package:unittest/html_individual_config.dart';
+import 'package:unittest/unittest.dart';
main() {
useHtmlIndividualConfiguration();
@@ -58,12 +58,12 @@ main() {
);
test('empty', () {
- expect(() => new svg.SvgElement.svg(""), throwsArgumentError);
+ expect(() => new svg.SvgElement.svg(""), throwsStateError);
});
test('too many elements', () {
expect(() => new svg.SvgElement.svg("<circle></circle><path></path>"),
- throwsArgumentError);
+ throwsStateError);
});
});
@@ -262,7 +262,9 @@ main() {
testConstructor('polyline', (e) => e is svg.PolylineElement);
testConstructor('radialGradient', (e) => e is svg.RadialGradientElement);
testConstructor('rect', (e) => e is svg.RectElement);
- testConstructor('script', (e) => e is svg.ScriptElement);
+ test('script', () {
+ expect(new svg.SvgElement.tag('script') is svg.ScriptElement, isTrue);
+ });
testConstructor('stop', (e) => e is svg.StopElement);
testConstructor('style', (e) => e is svg.StyleElement);
testConstructor('switch', (e) => e is svg.SwitchElement);
« no previous file with comments | « tests/html/svg_test.dart ('k') | tests/html/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698