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

Unified Diff: test/iron_selector_basic_test.dart

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
« no previous file with comments | « test/iron_selector_activate_event_test.dart ('k') | test/iron_selector_content_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/iron_selector_basic_test.dart
diff --git a/test/iron_selector_basic_test.dart b/test/iron_selector_basic_test.dart
index 4dd04c40719092f5ef16a337f74ee8bfea2c91ab..e20593f4e26aaaf8ca3d3984cd00dc751fea0ffc 100644
--- a/test/iron_selector_basic_test.dart
+++ b/test/iron_selector_basic_test.dart
@@ -5,6 +5,7 @@
library polymer_elements.test.iron_selector_basic_test;
import 'dart:html';
+import 'package:polymer_interop/polymer_interop.dart';
import 'package:polymer_elements/iron_selector.dart';
import 'package:test/test.dart';
import 'package:web_components/web_components.dart';
@@ -112,5 +113,22 @@ main() async {
sub.cancel();
});
});
+
+ group('dynamic selector', () {
+ test('selects dynamically added child automatically', () async {
+ var selector = document.createElement('iron-selector');
+ var child = document.createElement('div');
+
+ selector.selected = '0';
+ child.text = 'Item 0';
+
+ Polymer.dom(selector).append(child);
+ document.body.append(selector);
+
+ await wait(1);
+ expect(child.className, 'iron-selected');
+ selector.remove();
+ });
+ });
});
}
« no previous file with comments | « test/iron_selector_activate_event_test.dart ('k') | test/iron_selector_content_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698