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

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, 6 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
Index: tests/html/svgelement_test.dart
diff --git a/tests/html/svgelement_test.dart b/tests/html/svgelement_test.dart
index 256e766f01fadae101f782430522a130ef30c9f2..6cdb91f1cdb18428cc32be8cb9dc18d137468132 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);

Powered by Google App Engine
This is Rietveld 408576698