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

Side by Side Diff: tests/html/custom/document_register_type_extensions_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
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 document_register_type_extensions_test; 5 library document_register_type_extensions_test;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_individual_config.dart'; 7 import 'package:unittest/html_individual_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import '../utils.dart'; 9 import '../utils.dart';
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 registeredTypes = true; 95 registeredTypes = true;
96 document.register(Foo.tag, Foo); 96 document.register(Foo.tag, Foo);
97 document.register(Bar.tag, Bar, extendsTag: 'input'); 97 document.register(Bar.tag, Bar, extendsTag: 'input');
98 document.register(Baz.tag, Baz); 98 document.register(Baz.tag, Baz);
99 document.register(Qux.tag, Qux, extendsTag: 'input'); 99 document.register(Qux.tag, Qux, extendsTag: 'input');
100 document.register(MyCanvas.tag, MyCanvas, extendsTag: 'canvas'); 100 document.register(MyCanvas.tag, MyCanvas, extendsTag: 'canvas');
101 document.register(CustomCustomDiv.tag, CustomCustomDiv, extendsTag: 'div'); 101 document.register(CustomCustomDiv.tag, CustomCustomDiv, extendsTag: 'div');
102 } 102 }
103 103
104 setUp(loadPolyfills); 104 setUp(() => customElementsReady);
105 105
106 group('registration', () { 106 group('registration', () {
107 setUp(registerTypes); 107 setUp(registerTypes);
108 108
109 test('cannot register twice', () { 109 test('cannot register twice', () {
110 expect(() => document.register(FooBad.tag, Foo, extendsTag: 'div'), 110 expect(() => document.register(FooBad.tag, Foo, extendsTag: 'div'),
111 throws); 111 throws);
112 }); 112 });
113 113
114 test('cannot register for non-matching tag', () { 114 test('cannot register for non-matching tag', () {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 group('functional', () { 309 group('functional', () {
310 setUp(registerTypes); 310 setUp(registerTypes);
311 311
312 test('canvas', () { 312 test('canvas', () {
313 var canvas = new MyCanvas(); 313 var canvas = new MyCanvas();
314 canvas.fillAsRed(); 314 canvas.fillAsRed();
315 }); 315 });
316 }); 316 });
317 } 317 }
OLDNEW
« no previous file with comments | « tests/html/custom/document_register_basic_test.html ('k') | tests/html/custom/document_register_type_extensions_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698