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

Side by Side Diff: test/iron_meta_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_media_query_test.dart ('k') | test/iron_overlay_behavior_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_meta_test; 5 library polymer_elements.test.iron_meta_test;
6 6
7 import 'dart:js';
7 import 'package:polymer_elements/iron_meta.dart'; 8 import 'package:polymer_elements/iron_meta.dart';
8 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
9 import 'package:web_components/web_components.dart'; 10 import 'package:web_components/web_components.dart';
10 import 'common.dart'; 11 import 'common.dart';
11 12
12 main() async { 13 main() async {
13 await initWebComponents(); 14 await initWebComponents();
14 15
15 group('<iron-meta>', () { 16 group('<iron-meta>', () {
16 group('basic behavior', () { 17 group('basic behavior', () {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 test('let the last value win registration against the key', () { 132 test('let the last value win registration against the key', () {
132 var registeredValue = metaPair[0].byKey(metaPair[0].key); 133 var registeredValue = metaPair[0].byKey(metaPair[0].key);
133 var firstValue = metaPair[0].value; 134 var firstValue = metaPair[0].value;
134 var secondValue = metaPair[1].value; 135 var secondValue = metaPair[1].value;
135 136
136 expect(registeredValue, isNot(firstValue)); 137 expect(registeredValue, isNot(firstValue));
137 expect(registeredValue, secondValue); 138 expect(registeredValue, secondValue);
138 }); 139 });
139 }); 140 });
141
142 group('singleton', () {
143
144 test('only one ironmeta created', () {
145 var ironMeta = context['Polymer']['IronMeta'];
146 var first = ironMeta.callMethod('getIronMeta');
147 var second = ironMeta.callMethod('getIronMeta');
148 expect(first, second);
149 });
150 });
140 }); 151 });
141 } 152 }
OLDNEW
« no previous file with comments | « test/iron_media_query_test.dart ('k') | test/iron_overlay_behavior_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698