@@ -22,8 +22,7 @@ import {
2222 ɵNoopNgZone ,
2323 ɵZONELESS_ENABLED ,
2424} from '../../src/core' ;
25- import { bootstrapApplication , BrowserModule } from '@angular/platform-browser' ;
26- import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' ;
25+ import { bootstrapApplication , BrowserModule , platformBrowser } from '@angular/platform-browser' ;
2726import { withBody } from '@angular/private/testing' ;
2827
2928describe ( 'bootstrap' , ( ) => {
@@ -34,7 +33,7 @@ describe('bootstrap', () => {
3433 'should bootstrap using #id selector' ,
3534 withBody ( '<div>before|</div><button id="my-app"></button>' , async ( ) => {
3635 try {
37- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( IdSelectorAppModule ) ;
36+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( IdSelectorAppModule ) ;
3837 expect ( document . body . textContent ) . toEqual ( 'before|works!' ) ;
3938 ngModuleRef . destroy ( ) ;
4039 } catch ( err ) {
@@ -47,9 +46,7 @@ describe('bootstrap', () => {
4746 'should bootstrap using one of selectors from the list' ,
4847 withBody ( '<div>before|</div><div class="bar"></div>' , async ( ) => {
4948 try {
50- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule (
51- MultipleSelectorsAppModule ,
52- ) ;
49+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( MultipleSelectorsAppModule ) ;
5350 expect ( document . body . textContent ) . toEqual ( 'before|works!' ) ;
5451 ngModuleRef . destroy ( ) ;
5552 } catch ( err ) {
@@ -118,7 +115,7 @@ describe('bootstrap', () => {
118115 withBody ( '<my-app></my-app>' , async ( ) => {
119116 const TestModule = createComponentAndModule ( ) ;
120117
121- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
118+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
122119 expect ( document . body . innerHTML ) . toContain ( '<span _ngcontent-' ) ;
123120 ngModuleRef . destroy ( ) ;
124121 } ) ,
@@ -129,7 +126,7 @@ describe('bootstrap', () => {
129126 withBody ( '<my-app></my-app>' , async ( ) => {
130127 const TestModule = createComponentAndModule ( ) ;
131128
132- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule , {
129+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule , {
133130 defaultEncapsulation : ViewEncapsulation . None ,
134131 } ) ;
135132 expect ( document . body . innerHTML ) . toContain ( '<span>' ) ;
@@ -143,7 +140,7 @@ describe('bootstrap', () => {
143140 withBody ( '<my-app></my-app>' , async ( ) => {
144141 const TestModule = createComponentAndModule ( ) ;
145142
146- const ngModuleRef = await platformBrowserDynamic ( [
143+ const ngModuleRef = await platformBrowser ( [
147144 {
148145 provide : COMPILER_OPTIONS ,
149146 useValue : { defaultEncapsulation : ViewEncapsulation . None } ,
@@ -161,7 +158,7 @@ describe('bootstrap', () => {
161158 withBody ( '<my-app></my-app>' , async ( ) => {
162159 const TestModule = createComponentAndModule ( { encapsulation : ViewEncapsulation . Emulated } ) ;
163160
164- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule , {
161+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule , {
165162 defaultEncapsulation : ViewEncapsulation . None ,
166163 } ) ;
167164 expect ( document . body . innerHTML ) . toContain ( '<span _ngcontent-' ) ;
@@ -174,7 +171,7 @@ describe('bootstrap', () => {
174171 withBody ( '<my-app></my-app>' , async ( ) => {
175172 const TestModule = createComponentAndModule ( ) ;
176173
177- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
174+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
178175 expect ( document . body . innerHTML ) . toContain ( 'a b' ) ;
179176 ngModuleRef . destroy ( ) ;
180177 } ) ,
@@ -185,7 +182,7 @@ describe('bootstrap', () => {
185182 withBody ( '<my-app></my-app>' , async ( ) => {
186183 const TestModule = createComponentAndModule ( ) ;
187184
188- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule , {
185+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule , {
189186 preserveWhitespaces : true ,
190187 } ) ;
191188 expect ( document . body . innerHTML ) . toContain ( 'a b' ) ;
@@ -198,7 +195,7 @@ describe('bootstrap', () => {
198195 withBody ( '<my-app></my-app>' , async ( ) => {
199196 const TestModule = createComponentAndModule ( ) ;
200197
201- const ngModuleRef = await platformBrowserDynamic ( [
198+ const ngModuleRef = await platformBrowser ( [
202199 { provide : COMPILER_OPTIONS , useValue : { preserveWhitespaces : true } , multi : true } ,
203200 ] ) . bootstrapModule ( TestModule ) ;
204201 expect ( document . body . innerHTML ) . toContain ( 'a b' ) ;
@@ -211,7 +208,7 @@ describe('bootstrap', () => {
211208 withBody ( '<my-app></my-app>' , async ( ) => {
212209 const TestModule = createComponentAndModule ( { preserveWhitespaces : false } ) ;
213210
214- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule , {
211+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule , {
215212 preserveWhitespaces : true ,
216213 } ) ;
217214 expect ( document . body . innerHTML ) . toContain ( 'a b' ) ;
@@ -225,7 +222,7 @@ describe('bootstrap', () => {
225222 withBody ( '<my-app></my-app>' , async ( ) => {
226223 const TestModule = createComponentAndModule ( ) ;
227224
228- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
225+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
229226 const appRef = ngModuleRef . injector . get ( ApplicationRef ) ;
230227 const testabilityRegistry = ngModuleRef . injector . get ( TestabilityRegistry ) ;
231228
@@ -244,7 +241,7 @@ describe('bootstrap', () => {
244241 withBody ( '<my-app></my-app>' , async ( ) => {
245242 const TestModule = createComponentAndModule ( ) ;
246243
247- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
244+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
248245 const appRef = ngModuleRef . injector . get ( ApplicationRef ) ;
249246 const testabilityRegistry = ngModuleRef . injector . get ( TestabilityRegistry ) ;
250247 const componentRef = appRef . components [ 0 ] ;
@@ -264,7 +261,7 @@ describe('bootstrap', () => {
264261 withBody ( '<my-app></my-app>' , async ( ) => {
265262 const TestModule = createComponentAndModule ( ) ;
266263
267- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
264+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
268265 const appRef = ngModuleRef . injector . get ( ApplicationRef ) ;
269266 const testabilityRegistry = ngModuleRef . injector . get ( TestabilityRegistry ) ;
270267 const componentRef = appRef . components [ 0 ] ;
@@ -285,7 +282,7 @@ describe('bootstrap', () => {
285282 withBody ( '<my-app></my-app>' , async ( ) => {
286283 const TestModule = createComponentAndModule ( ) ;
287284
288- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
285+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
289286 const appRef = ngModuleRef . injector . get ( ApplicationRef ) ;
290287 const testabilityRegistry = ngModuleRef . injector . get ( TestabilityRegistry ) ;
291288 const componentRef = appRef . components [ 0 ] ;
@@ -316,7 +313,7 @@ describe('bootstrap', () => {
316313 class MyModule { }
317314
318315 try {
319- await platformBrowserDynamic ( ) . bootstrapModule ( MyModule ) ;
316+ await platformBrowser ( ) . bootstrapModule ( MyModule ) ;
320317
321318 // This test tries to bootstrap a standalone component using NgModule-based bootstrap
322319 // mechanisms. We expect standalone components to be bootstrapped via
@@ -350,7 +347,7 @@ describe('bootstrap', () => {
350347 } )
351348 class MyModule { }
352349
353- const { injector} = await platformBrowserDynamic ( ) . bootstrapModule ( MyModule ) ;
350+ const { injector} = await platformBrowser ( ) . bootstrapModule ( MyModule ) ;
354351 expect ( ( injector . get ( NgZone ) as any ) . shouldCoalesceEventChangeDetection ) . toBe ( true ) ;
355352 } ) ,
356353 ) ;
@@ -373,7 +370,7 @@ describe('bootstrap', () => {
373370 } )
374371 class MyModule { }
375372
376- const { injector} = await platformBrowserDynamic ( ) . bootstrapModule ( MyModule ) ;
373+ const { injector} = await platformBrowser ( ) . bootstrapModule ( MyModule ) ;
377374 expect ( injector . get ( NgZone ) ) . toBeInstanceOf ( ɵNoopNgZone ) ;
378375 expect ( injector . get ( ɵZONELESS_ENABLED ) ) . toBeTrue ( ) ;
379376 } ) ,
@@ -394,7 +391,7 @@ describe('bootstrap', () => {
394391 class MyModule { }
395392
396393 try {
397- await platformBrowserDynamic ( ) . bootstrapModule ( MyModule ) ;
394+ await platformBrowser ( ) . bootstrapModule ( MyModule ) ;
398395
399396 // This test tries to bootstrap a standalone component using NgModule-based bootstrap
400397 // mechanisms. We expect standalone components to be bootstrapped via
@@ -418,7 +415,7 @@ describe('bootstrap', () => {
418415 withBody ( '<my-app></my-app>' , async ( ) => {
419416 const TestModule = createComponentAndModule ( ) ;
420417
421- const ngModuleRef = await platformBrowserDynamic ( ) . bootstrapModule ( TestModule ) ;
418+ const ngModuleRef = await platformBrowser ( ) . bootstrapModule ( TestModule ) ;
422419 const ngZone = ngModuleRef . injector . get ( NgZone ) ;
423420
424421 expect ( ngZone . onError . observers . length ) . toBe ( 1 ) ;
@@ -438,7 +435,7 @@ describe('bootstrap', () => {
438435 it (
439436 'should log an error when changing defaultEncapsulation bootstrap options' ,
440437 withBody ( '<my-app-a></my-app-a><my-app-b></my-app-b>' , async ( ) => {
441- const platformRef = platformBrowserDynamic ( ) ;
438+ const platformRef = platformBrowser ( ) ;
442439
443440 const TestModuleA = createComponentAndModule ( { selector : 'my-app-a' } ) ;
444441 const ngModuleRefA = await platformRef . bootstrapModule ( TestModuleA , {
@@ -464,7 +461,7 @@ describe('bootstrap', () => {
464461 it (
465462 'should log an error when changing preserveWhitespaces bootstrap options' ,
466463 withBody ( '<my-app-a></my-app-a><my-app-b></my-app-b>' , async ( ) => {
467- const platformRef = platformBrowserDynamic ( ) ;
464+ const platformRef = platformBrowser ( ) ;
468465
469466 const TestModuleA = createComponentAndModule ( { selector : 'my-app-a' } ) ;
470467 const ngModuleRefA = await platformRef . bootstrapModule ( TestModuleA , {
@@ -490,7 +487,7 @@ describe('bootstrap', () => {
490487 it (
491488 'should log an error when changing defaultEncapsulation to its default' ,
492489 withBody ( '<my-app-a></my-app-a><my-app-b></my-app-b>' , async ( ) => {
493- const platformRef = platformBrowserDynamic ( ) ;
490+ const platformRef = platformBrowser ( ) ;
494491
495492 const TestModuleA = createComponentAndModule ( { selector : 'my-app-a' } ) ;
496493 const ngModuleRefA = await platformRef . bootstrapModule ( TestModuleA ) ;
@@ -513,7 +510,7 @@ describe('bootstrap', () => {
513510 it (
514511 'should log an error when changing preserveWhitespaces to its default' ,
515512 withBody ( '<my-app-a></my-app-a><my-app-b></my-app-b>' , async ( ) => {
516- const platformRef = platformBrowserDynamic ( ) ;
513+ const platformRef = platformBrowser ( ) ;
517514
518515 const TestModuleA = createComponentAndModule ( { selector : 'my-app-a' } ) ;
519516 const ngModuleRefA = await platformRef . bootstrapModule ( TestModuleA ) ;
@@ -536,7 +533,7 @@ describe('bootstrap', () => {
536533 it (
537534 'should not log an error when passing identical bootstrap options' ,
538535 withBody ( '<my-app-a></my-app-a><my-app-b></my-app-b>' , async ( ) => {
539- const platformRef = platformBrowserDynamic ( ) ;
536+ const platformRef = platformBrowser ( ) ;
540537
541538 const TestModuleA = createComponentAndModule ( { selector : 'my-app-a' } ) ;
542539 const ngModuleRefA = await platformRef . bootstrapModule ( TestModuleA , {
0 commit comments