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

Side by Side Diff: tests/html/svg_attrs_test.dart

Issue 15941011: I had just added this test to validate that SVG namespaced attrs are working, but it's proving to b… (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library SVGTest;
6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_config.dart';
8 import 'dart:svg';
9
10 main() {
11 useHtmlConfiguration();
12
13 test('svg parsed attributes', () {
14 var content = """
15 <svg version="1.1"
16 xmlns:xlink="http://www.w3.org/1999/xlink">
17 <image xlink:href="foo.jpg"/>
18 </svg>""";
19
20 var svg = new SvgElement.svg(content);
21 var img = svg.children[0];
22 expect(img is ImageElement, isTrue);
23 var attrs = img.attributes;
24 expect(attrs.length, 0);
25
26 var xlinkAttrs =
27 img.getNamespacedAttributes('http://www.w3.org/1999/xlink');
28 expect(xlinkAttrs.length, 1);
29 expect(xlinkAttrs['href'], 'foo.jpg');
30
31 // validate that the namespaced attr was set by waiting for the image
32 // to fail to load.
33 return img.onError.first;
34 });
35
36 test('svg explicit attributes', () {
37
38 var img = new ImageElement();
39 var xlinkAttrs =
40 img.getNamespacedAttributes('http://www.w3.org/1999/xlink');
41 xlinkAttrs['href'] = 'foo.jpg';
42
43 // validate that the namespaced attr was set by waiting for the image
44 // to fail to load.
45 return img.onError.first;
46 });
47 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698