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

Unified Diff: pkg/custom_element/test/custom_element_test.dart

Issue 23525003: Safe DOM w/ fixes (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 | « pkg/custom_element/lib/custom_element.dart ('k') | pkg/mdv/test/custom_element_bindings_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/custom_element/test/custom_element_test.dart
diff --git a/pkg/custom_element/test/custom_element_test.dart b/pkg/custom_element/test/custom_element_test.dart
index e2f920a18f2ad1321481e918abe5272fd0d8cc21..341713aa364db6f061643e4c0b43f6a588efa2c2 100644
--- a/pkg/custom_element/test/custom_element_test.dart
+++ b/pkg/custom_element/test/custom_element_test.dart
@@ -25,7 +25,8 @@ main() {
customElementTests() {
test('register creates the element and calls lifecycle methods', () {
// Add element to the page.
- var element = new Element.html('<fancy-button>foo bar</fancy-button>');
+ var element = new Element.html('<fancy-button>foo bar</fancy-button>',
+ treeSanitizer: new NullTreeSanitizer());
document.body.nodes.add(element);
var xtag = null;
@@ -91,3 +92,10 @@ class FancyButton extends CustomElement {
lifecycle.add('removed');
}
}
+
+/**
+ * Sanitizer which does nothing.
+ */
+class NullTreeSanitizer implements NodeTreeSanitizer {
+ void sanitizeTree(Node node) {}
+}
« no previous file with comments | « pkg/custom_element/lib/custom_element.dart ('k') | pkg/mdv/test/custom_element_bindings_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698