@@ -1745,22 +1745,24 @@ export function main() {
17451745 if ( DOM . supportsDOMEvents ( ) ) {
17461746 describe ( 'svg' , ( ) => {
17471747 it ( 'should support svg elements' ,
1748- inject ( [ TestComponentBuilder , AsyncTestCompleter ] ,
1749- ( tcb : TestComponentBuilder , async ) => {
1750- tcb . overrideView ( MyComp , new ViewMetadata ( { template : '<svg><g></g></svg>' } ) )
1751- . createAsync ( MyComp )
1752- . then ( ( rootTC ) => {
1753- var el = rootTC . debugElement . nativeElement ;
1754- var svg = DOM . childNodes ( el ) [ 0 ] ;
1755- var g = DOM . childNodes ( svg ) [ 0 ] ;
1756- expect ( DOM . getProperty ( < Element > svg , 'namespaceURI' ) )
1757- . toEqual ( 'http://www.w3.org/2000/svg' ) ;
1758- expect ( DOM . getProperty ( < Element > g , 'namespaceURI' ) )
1759- . toEqual ( 'http://www.w3.org/2000/svg' ) ;
1748+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder ,
1749+ async ) => {
1750+ tcb . overrideView ( MyComp ,
1751+ new ViewMetadata ( { template : '<svg><use xlink:href="Port" /></svg>' } ) )
1752+ . createAsync ( MyComp )
1753+ . then ( ( rootTC ) => {
1754+ var el = rootTC . debugElement . nativeElement ;
1755+ var svg = DOM . childNodes ( el ) [ 0 ] ;
1756+ var use = DOM . childNodes ( svg ) [ 0 ] ;
1757+ expect ( DOM . getProperty ( < Element > svg , 'namespaceURI' ) )
1758+ . toEqual ( 'http://www.w3.org/2000/svg' ) ;
1759+ expect ( DOM . getProperty ( < Element > use , 'namespaceURI' ) )
1760+ . toEqual ( 'http://www.w3.org/2000/svg' ) ;
1761+ expect ( DOM . getOuterHTML ( < HTMLElement > use ) ) . toContain ( 'xmlns:xlink' ) ;
17601762
1761- async . done ( ) ;
1762- } ) ;
1763- } ) ) ;
1763+ async . done ( ) ;
1764+ } ) ;
1765+ } ) ) ;
17641766
17651767 } ) ;
17661768 }
0 commit comments