@@ -10,6 +10,7 @@ main() {
10
10
beforeEachModule ((Module module) {
11
11
module
12
12
..bind (WebPlatformTestComponent )
13
+ ..bind (WebPlatformTestComponentWithAttribute )
13
14
..bind (InnerComponent )
14
15
..bind (OuterComponent )
15
16
..bind (WebPlatform , toValue: new WebPlatform ());
@@ -54,6 +55,24 @@ main() {
54
55
}
55
56
}));
56
57
58
+ it ('should not crash with an attribute selector; but wont work either..' ,
59
+ async ((TestBed _, MockHttpBackend backend, WebPlatform platform) {
60
+
61
+ backend
62
+ ..expectGET ('style.css' ).respond (200 , 'span { background-color: red; '
63
+ '}' )
64
+ ..expectGET ('template.html' ).respond (200 , '<span>foo</span>' );
65
+
66
+ Element element = e ('<span><test-wptca a><span>ignore'
67
+ '</span></test-wptca></span>' );
68
+
69
+ _.compile (element);
70
+
71
+ microLeap ();
72
+ backend.flush ();
73
+ microLeap ();
74
+ }));
75
+
57
76
it ('should scope :host styles to the primary element.' ,
58
77
async ((TestBed _, MockHttpBackend backend, WebPlatform platform) {
59
78
@@ -176,6 +195,14 @@ main() {
176
195
class WebPlatformTestComponent {
177
196
}
178
197
198
+ @Component (
199
+ selector: "test-wptca[a]" ,
200
+ publishAs: "ctrl" ,
201
+ templateUrl: "template.html" ,
202
+ cssUrl: "style.css" )
203
+ class WebPlatformTestComponentWithAttribute {
204
+ }
205
+
179
206
@Component (
180
207
selector: "my-inner" ,
181
208
publishAs: "ctrl" ,
0 commit comments