@@ -47,16 +47,17 @@ main() => describe('template url', () {
47
47
describe ('loading with http rewriting' , () {
48
48
beforeEach (module ((Module module) {
49
49
module
50
- ..type (HtmlAndCssComponent )
51
- ..type (UrlRewriter , implementedBy: PrefixedUrlRewriter );
50
+ ..type (HtmlAndCssComponent )
51
+ ..type (UrlRewriter , implementedBy: PrefixedUrlRewriter );
52
52
}));
53
53
54
54
it ('should use the UrlRewriter for both HTML and CSS URLs' , async (inject ((Http $http,
55
55
Compiler $compile, Scope $rootScope, Logger log, Injector injector, NgZone zone,
56
56
MockHttpBackend backend, DirectiveMap directives) {
57
57
58
- backend.whenGET ('PREFIX:simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' );
59
- backend.whenGET ('PREFIX:simple.css' ).respond ('.hello{}' );
58
+ backend
59
+ ..whenGET ('PREFIX:simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' )
60
+ ..whenGET ('PREFIX:simple.css' ).respond ('.hello{}' );
60
61
61
62
var element = $('<div><html-and-css log>ignore</html-and-css><div>' );
62
63
zone.run (() {
@@ -76,11 +77,12 @@ main() => describe('template url', () {
76
77
77
78
describe ('async template loading' , () {
78
79
beforeEach (module ((Module module) {
79
- module.type (LogAttrDirective );
80
- module.type (SimpleUrlComponent );
81
- module.type (HtmlAndCssComponent );
82
- module.type (OnlyCssComponent );
83
- module.type (InlineWithCssComponent );
80
+ module
81
+ ..type (LogAttrDirective )
82
+ ..type (SimpleUrlComponent )
83
+ ..type (HtmlAndCssComponent )
84
+ ..type (OnlyCssComponent )
85
+ ..type (InlineWithCssComponent );
84
86
}));
85
87
86
88
it ('should replace element with template from url' , async (inject ((Http $http,
@@ -124,8 +126,9 @@ main() => describe('template url', () {
124
126
it ('should load a CSS file into a style' , async (inject ((Http $http,
125
127
Compiler $compile, Scope $rootScope, Logger log, Injector injector,
126
128
MockHttpBackend backend, DirectiveMap directives) {
127
- backend.expectGET ('simple.css' ).respond ('.hello{}' );
128
- backend.expectGET ('simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' );
129
+ backend
130
+ ..expectGET ('simple.css' ).respond ('.hello{}' )
131
+ ..expectGET ('simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' );
129
132
130
133
var element = $('<div><html-and-css log>ignore</html-and-css><div>' );
131
134
$compile (element, directives)(injector, element);
@@ -169,8 +172,9 @@ main() => describe('template url', () {
169
172
it ('should load the CSS before the template is loaded' , async (inject ((Http $http,
170
173
Compiler $compile, Scope $rootScope, Injector injector,
171
174
MockHttpBackend backend, DirectiveMap directives) {
172
- backend.expectGET ('simple.css' ).respond ('.hello{}' );
173
- backend.expectGET ('simple.html' ).respond ('<div>Simple!</div>' );
175
+ backend
176
+ ..expectGET ('simple.css' ).respond ('.hello{}' )
177
+ ..expectGET ('simple.html' ).respond ('<div>Simple!</div>' );
174
178
175
179
var element = $('<html-and-css>ignore</html-and-css>' );
176
180
$compile (element, directives)(injector, element);
@@ -183,16 +187,18 @@ main() => describe('template url', () {
183
187
184
188
describe ('multiple css loading' , () {
185
189
beforeEach (module ((Module module) {
186
- module.type (LogAttrDirective );
187
- module.type (HtmlAndMultipleCssComponent );
190
+ module
191
+ ..type (LogAttrDirective )
192
+ ..type (HtmlAndMultipleCssComponent );
188
193
}));
189
194
190
195
it ('should load multiple CSS files into a style' , async (inject ((Http $http,
191
196
Compiler $compile, Scope $rootScope, Logger log, Injector injector,
192
197
MockHttpBackend backend, DirectiveMap directives) {
193
- backend.expectGET ('simple.css' ).respond ('.hello{}' );
194
- backend.expectGET ('another.css' ).respond ('.world{}' );
195
- backend.expectGET ('simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' );
198
+ backend
199
+ ..expectGET ('simple.css' ).respond ('.hello{}' )
200
+ ..expectGET ('another.css' ).respond ('.world{}' )
201
+ ..expectGET ('simple.html' ).respond ('<div log="SIMPLE">Simple!</div>' );
196
202
197
203
var element = $('<div><html-and-css log>ignore</html-and-css><div>' );
198
204
$compile (element, directives)(injector, element);
0 commit comments