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

Side by Side Diff: pkg/polymer/test/mirror_loader_test.dart

Issue 219433004: Fix mirror_loader to detect whether the type is a generic class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « pkg/polymer/lib/src/mirror_loader.dart ('k') | pkg/polymer/test/mirror_loader_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6 import 'dart:html';
7
8 import 'package:unittest/unittest.dart';
9 import 'package:unittest/html_config.dart';
10 import 'package:polymer/polymer.dart';
11
12 @CustomTag('x-a')
13 class XA extends PolymerElement {
14 final String x = "a";
15 XA.created() : super.created();
16 }
17
18 // The next classes are here as a regression test for darbug.com/17929. Our
19 // loader was incorrectly trying to retrieve the reflectiveType of these
20 // classes.
21 class Foo<T> {}
22
23 @CustomTag('x-b')
24 class XB<T> extends PolymerElement {
25 final String x = "a";
26 XB.created() : super.created();
27 }
28
29 main() {
30 useHtmlConfiguration();
31
32 runZoned(() {
33 initPolymer().run(() {
34 setUp(() => Polymer.onReady);
35
36 test('XA was registered correctly', () {
37 expect(querySelector('x-a').shadowRoot.nodes.first.text, 'a');
38 });
39
40 test('XB was not registered', () {
41 expect(querySelector('x-b').shadowRoot, null);
42 });
43 });
44 }, onError: (e) {
45 expect(e is UnsupportedError, isTrue);
46 expect('$e', contains(
47 'Custom element classes cannot have type-parameters: XB'));
48 });
49 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/mirror_loader.dart ('k') | pkg/polymer/test/mirror_loader_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698