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

Unified Diff: tests/html/custom_elements_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/custom/document_register_type_extensions_test.dart ('k') | tests/html/custom_tags_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/custom_elements_test.dart
diff --git a/tests/html/custom_elements_test.dart b/tests/html/custom_elements_test.dart
index 6a369fd3396a41b27cb99cbc2d6d7c74c9f73fdb..57019a4e555fe9319f40dd3df820a28e94de1015 100644
--- a/tests/html/custom_elements_test.dart
+++ b/tests/html/custom_elements_test.dart
@@ -7,6 +7,7 @@ import 'dart:async';
import 'dart:html';
import 'package:unittest/html_individual_config.dart';
import 'package:unittest/unittest.dart';
+import 'utils.dart';
class CustomMixin {
var mixinMethodCalled;
@@ -144,7 +145,9 @@ main() {
var tag = nextTag;
document.register(tag, CustomType);
var element = new DivElement();
- element.innerHtml = '<$tag></$tag>';
+ element.setInnerHtml('<$tag></$tag>',
+ treeSanitizer: new NullTreeSanitizer());
+ Platform.upgradeCustomElements(element);
document.body.nodes.add(element);
var queried = query(tag);
@@ -157,7 +160,9 @@ main() {
var tag = nextTag;
document.register(tag, CustomType);
var element = new DivElement();
- element.innerHtml = '<$tag id="someid"></$tag>';
+ element.setInnerHtml('<$tag id="someid"></$tag>',
+ treeSanitizer: new NullTreeSanitizer());
+ Platform.upgradeCustomElements(element);
document.body.nodes.add(element);
var queried = query('#someid');
@@ -173,7 +178,8 @@ main() {
var tag = nextTag;
document.register(tag, CustomType);
var element = new DivElement();
- element.innerHtml = '<$tag></$tag>';
+ element.setInnerHtml('<$tag></$tag>',
+ treeSanitizer: new NullTreeSanitizer());
Platform.upgradeCustomElements(element);
document.body.nodes.add(element);
expect(customCreatedCount, oldCount + 1);
« no previous file with comments | « tests/html/custom/document_register_type_extensions_test.dart ('k') | tests/html/custom_tags_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698