@@ -21,7 +21,7 @@ import {Lexer, Parser, dynamicChangeDetection,
2121
2222import { Compiler , CompilerCache } from 'angular2/src/core/compiler/compiler' ;
2323import { DirectiveMetadataReader } from 'angular2/src/core/compiler/directive_metadata_reader' ;
24- import { ShadowDomStrategy , NativeShadowDomStrategy } from 'angular2/src/core/compiler/shadow_dom_strategy' ;
24+ import { ShadowDomStrategy , EmulatedUnscopedShadowDomStrategy } from 'angular2/src/core/compiler/shadow_dom_strategy' ;
2525import { PrivateComponentLocation } from 'angular2/src/core/compiler/private_component_location' ;
2626import { PrivateComponentLoader } from 'angular2/src/core/compiler/private_component_loader' ;
2727import { TemplateLoader } from 'angular2/src/core/compiler/template_loader' ;
@@ -67,7 +67,7 @@ export function main() {
6767 directiveMetadataReader = new DirectiveMetadataReader ( ) ;
6868
6969 var urlResolver = new UrlResolver ( ) ;
70- shadowDomStrategy = new NativeShadowDomStrategy ( new StyleUrlResolver ( urlResolver ) ) ;
70+ shadowDomStrategy = new EmulatedUnscopedShadowDomStrategy ( new StyleUrlResolver ( urlResolver ) , null ) ;
7171
7272 compiler = createCompiler ( tplResolver , dynamicChangeDetection ) ;
7373 } ) ;
@@ -247,7 +247,7 @@ export function main() {
247247
248248 cd . detectChanges ( ) ;
249249
250- expect ( view . nodes [ 0 ] . shadowRoot . childNodes [ 0 ] . nodeValue ) . toEqual ( 'hello' ) ;
250+ expect ( view . nodes ) . toHaveText ( 'hello' ) ;
251251 async . done ( ) ;
252252 } ) ;
253253 } ) ) ;
@@ -301,12 +301,12 @@ export function main() {
301301 ctx . ctxProp = 'some_id' ;
302302 cd . detectChanges ( ) ;
303303 expect ( view . nodes [ 0 ] . id ) . toEqual ( 'some_id' ) ;
304- expect ( DOM . getInnerHTML ( view . nodes [ 0 ] . shadowRoot . childNodes [ 0 ] ) ) . toEqual ( 'Matched on id with some_id' ) ;
304+ expect ( view . nodes ) . toHaveText ( 'Matched on id with some_id' ) ;
305305
306306 ctx . ctxProp = 'other_id' ;
307307 cd . detectChanges ( ) ;
308308 expect ( view . nodes [ 0 ] . id ) . toEqual ( 'other_id' ) ;
309- expect ( DOM . getInnerHTML ( view . nodes [ 0 ] . shadowRoot . childNodes [ 0 ] ) ) . toEqual ( 'Matched on id with other_id' ) ;
309+ expect ( view . nodes ) . toHaveText ( 'Matched on id with other_id' ) ;
310310
311311 async . done ( ) ;
312312 } ) ;
@@ -534,7 +534,6 @@ export function main() {
534534 inline : '<dynamic-comp #dynamic></dynamic-comp>' ,
535535 directives : [ DynamicComp ]
536536 } ) ) ;
537-
538537 compiler . compile ( MyComp ) . then ( ( pv ) => {
539538 createView ( pv ) ;
540539
0 commit comments