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

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

Issue 1062383002: Temporarily suppress tests that do svg/innerHTML, consistency over treatment of foreignobject tag (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « tests/html/html.status ('k') | 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library validator_test; 5 library validator_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:svg' as svg; 9 import 'dart:svg' as svg;
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 import 'package:unittest/html_config.dart'; 11 import 'package:unittest/html_individual_config.dart';
12 import 'utils.dart'; 12 import 'utils.dart';
13 13
14 14
15 var nullSanitizer = new NullTreeSanitizer(); 15 var nullSanitizer = new NullTreeSanitizer();
16 16
17 void validateHtml(String html, String reference, NodeValidator validator) { 17 void validateHtml(String html, String reference, NodeValidator validator) {
18 var a = document.body.createFragment(html, validator: validator); 18 var a = document.body.createFragment(html, validator: validator);
19 var b = document.body.createFragment(reference, 19 var b = document.body.createFragment(reference,
20 treeSanitizer: nullSanitizer); 20 treeSanitizer: nullSanitizer);
21 21
(...skipping 18 matching lines...) Expand all
40 test(name, () { 40 test(name, () {
41 if (reference == null) { 41 if (reference == null) {
42 reference = html; 42 reference = html;
43 } 43 }
44 44
45 validateHtml(html, reference, validator); 45 validateHtml(html, reference, validator);
46 }); 46 });
47 } 47 }
48 48
49 main() { 49 main() {
50 useHtmlConfiguration(); 50 useHtmlIndividualConfiguration();
51 51
52 group('DOM sanitization', () { 52 group('DOM sanitization', () {
53 var validator = new NodeValidatorBuilder.common(); 53 var validator = new NodeValidatorBuilder.common();
54 54
55 testHtml('allows simple constructs', 55 testHtml('allows simple constructs',
56 validator, 56 validator,
57 '<div class="baz">something</div>'); 57 '<div class="baz">something</div>');
58 58
59 testHtml('blocks unknown attributes', 59 testHtml('blocks unknown attributes',
60 validator, 60 validator,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 '<image xlink:href="foo" data-foo="bar"/>' 451 '<image xlink:href="foo" data-foo="bar"/>'
452 '</svg>'; 452 '</svg>';
453 453
454 var fragment = new DocumentFragment.svg(svgText); 454 var fragment = new DocumentFragment.svg(svgText);
455 var element = fragment.nodes.first; 455 var element = fragment.nodes.first;
456 expect(element is svg.SvgSvgElement, isTrue); 456 expect(element is svg.SvgSvgElement, isTrue);
457 expect(element.children[0] is svg.ImageElement, isTrue); 457 expect(element.children[0] is svg.ImageElement, isTrue);
458 }); 458 });
459 }); 459 });
460 } 460 }
OLDNEW
« 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