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

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

Issue 158083002: introduce web_components pkg for consolidated polyfills (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « tests/html/custom/template_wrappers_test.html ('k') | tests/html/custom_elements_test.html » ('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 import 'utils.dart'; 10 import 'utils.dart';
(...skipping 23 matching lines...) Expand all
34 int customCreatedCount = 0; 34 int customCreatedCount = 0;
35 35
36 int nextTagId = 0; 36 int nextTagId = 0;
37 String get nextTag => 'x-type${nextTagId++}'; 37 String get nextTag => 'x-type${nextTagId++}';
38 38
39 class NotAnElement {} 39 class NotAnElement {}
40 40
41 main() { 41 main() {
42 useHtmlIndividualConfiguration(); 42 useHtmlIndividualConfiguration();
43 43
44 setUp(loadPolyfills); 44 setUp(() => customElementsReady);
45 45
46 group('register', () { 46 group('register', () {
47 test('register', () { 47 test('register', () {
48 var tag = nextTag; 48 var tag = nextTag;
49 document.register(tag, CustomType); 49 document.register(tag, CustomType);
50 50
51 var element = new Element.tag(tag); 51 var element = new Element.tag(tag);
52 expect(element, isNotNull); 52 expect(element, isNotNull);
53 expect(element is CustomType, isTrue); 53 expect(element is CustomType, isTrue);
54 expect(element.createdCalled, isTrue); 54 expect(element.createdCalled, isTrue);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 test('can invoke mixin methods', () { 179 test('can invoke mixin methods', () {
180 var tag = nextTag; 180 var tag = nextTag;
181 document.register(tag, CustomType); 181 document.register(tag, CustomType);
182 182
183 var element = new Element.tag(tag); 183 var element = new Element.tag(tag);
184 element.invokeMixinMethod(); 184 element.invokeMixinMethod();
185 expect(element.mixinMethodCalled, isTrue); 185 expect(element.mixinMethodCalled, isTrue);
186 }); 186 });
187 }); 187 });
188 } 188 }
OLDNEW
« no previous file with comments | « tests/html/custom/template_wrappers_test.html ('k') | tests/html/custom_elements_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698