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

Side by Side Diff: tests/html/custom_elements_test.dart

Issue 22891020: Platform.upgradeCustomElements for Dartium (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/html/html.status » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 library custom_elements_test; 5 library custom_elements_test;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:unittest/html_individual_config.dart'; 8 import 'package:unittest/html_individual_config.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 }); 167 });
168 }); 168 });
169 169
170 group('lifecycle', () { 170 group('lifecycle', () {
171 test('onCreated', () { 171 test('onCreated', () {
172 int oldCount = customCreatedCount; 172 int oldCount = customCreatedCount;
173 var tag = nextTag; 173 var tag = nextTag;
174 document.register(tag, CustomType); 174 document.register(tag, CustomType);
175 var element = new DivElement(); 175 var element = new DivElement();
176 element.innerHtml = '<$tag></$tag>'; 176 element.innerHtml = '<$tag></$tag>';
177 Platform.upgradeCustomElements(element);
177 document.body.nodes.add(element); 178 document.body.nodes.add(element);
178 expect(customCreatedCount, oldCount + 1); 179 expect(customCreatedCount, oldCount + 1);
179 }); 180 });
180 }); 181 });
181 182
182 group('mixins', () { 183 group('mixins', () {
183 test('can invoke mixin methods', () { 184 test('can invoke mixin methods', () {
184 var tag = nextTag; 185 var tag = nextTag;
185 document.register(tag, CustomType); 186 document.register(tag, CustomType);
186 187
187 var element = new Element.tag(tag); 188 var element = new Element.tag(tag);
188 element.invokeMixinMethod(); 189 element.invokeMixinMethod();
189 expect(element.mixinMethodCalled, isTrue); 190 expect(element.mixinMethodCalled, isTrue);
190 }); 191 });
191 }); 192 });
192 } 193 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698