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

Unified Diff: pkg/mdv/test/template_element_test.dart

Issue 21093005: remove bindModel, the same effect can be achieved through createInstance (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: pkg/mdv/test/template_element_test.dart
diff --git a/pkg/mdv/test/template_element_test.dart b/pkg/mdv/test/template_element_test.dart
index d4cd50101d983eb7bb4066ce1ba66ab535013705..a424e9eb02e3b1d3101ba628193698370a7273b7 100644
--- a/pkg/mdv/test/template_element_test.dart
+++ b/pkg/mdv/test/template_element_test.dart
@@ -1566,22 +1566,20 @@ templateElementTests() {
}
});
- observeTest('BindShadowDOM bindModel', () {
+ observeTest('BindShadowDOM createInstance', () {
if (ShadowRoot.supported) {
- var root = createShadowTestHtml('Hi {{ name }}');
var model = toSymbolMap({'name': 'Leela'});
- mdv.bindModel(root, model);
+ var template = new Element.html('<template>Hi {{ name }}</template>');
+ var root = createShadowTestHtml('');
+ root.nodes.add(template.createInstance(model));
+
performMicrotaskCheckpoint();
expect(root.text, 'Hi Leela');
- }
- });
- observeTest('bindModel to polyfilled shadow root', () {
- var root = createTestHtml('Hi {{ name }}');
- var model = toSymbolMap({'name': 'Leela'});
- mdv.bindModel(root, model);
- performMicrotaskCheckpoint();
- expect(root.text, 'Hi Leela');
+ model[sym('name')] = 'Fry';
+ performMicrotaskCheckpoint();
+ expect(root.text, 'Hi Fry');
+ }
});
observeTest('BindShadowDOM Template Ref', () {

Powered by Google App Engine
This is Rietveld 408576698