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

Unified Diff: lib/src/iron-selector/test/basic.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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: lib/src/iron-selector/test/basic.html
diff --git a/lib/src/iron-selector/test/basic.html b/lib/src/iron-selector/test/basic.html
index 047225f7658d3f1437521e86a82438c80a88fbf9..68974b22befdd43cd2664a78a9a3e7dbc70f4426 100644
--- a/lib/src/iron-selector/test/basic.html
+++ b/lib/src/iron-selector/test/basic.html
@@ -165,6 +165,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, 1);
});
});
+
+ suite('dynamic selector', function() {
+ test('selects dynamically added child automatically', function(done) {
+ var selector = document.createElement('iron-selector');
+ var child = document.createElement('div');
+
+ selector.selected = '0';
+ child.textContent = 'Item 0';
+
+ Polymer.dom(selector).appendChild(child);
+ document.body.appendChild(selector);
+
+ Polymer.Base.async(function() {
+ assert.equal(child.className, 'iron-selected');
+ document.body.removeChild(selector);
+ done();
+ }, 1);
+ });
+ });
});
</script>
« no previous file with comments | « lib/src/iron-selector/test/activate-event.html ('k') | lib/src/iron-selector/test/excluded-local-names.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698