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

Side by Side 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, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 @TestOn('browser') 4 @TestOn('browser')
5 library polymer_elements.test.iron_selector_basic_test; 5 library polymer_elements.test.iron_selector_basic_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer_interop/polymer_interop.dart';
8 import 'package:polymer_elements/iron_selector.dart'; 9 import 'package:polymer_elements/iron_selector.dart';
9 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
10 import 'package:web_components/web_components.dart'; 11 import 'package:web_components/web_components.dart';
11 import 'common.dart'; 12 import 'common.dart';
12 13
13 main() async { 14 main() async {
14 await initWebComponents(); 15 await initWebComponents();
15 16
16 group('defaults', () { 17 group('defaults', () {
17 IronSelector s1; 18 IronSelector s1;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 await wait(1); 107 await wait(1);
107 s2.children.remove(newItem); 108 s2.children.remove(newItem);
108 109
109 await wait(1); 110 await wait(1);
110 expect(changeCount, 2); 111 expect(changeCount, 2);
111 112
112 sub.cancel(); 113 sub.cancel();
113 }); 114 });
114 }); 115 });
116
117 group('dynamic selector', () {
118 test('selects dynamically added child automatically', () async {
119 var selector = document.createElement('iron-selector');
120 var child = document.createElement('div');
121
122 selector.selected = '0';
123 child.text = 'Item 0';
124
125 Polymer.dom(selector).append(child);
126 document.body.append(selector);
127
128 await wait(1);
129 expect(child.className, 'iron-selected');
130 selector.remove();
131 });
132 });
115 }); 133 });
116 } 134 }
OLDNEW
« 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