diff --git a/modules/@angular/core/test/linker/security_integration_spec.ts b/modules/@angular/core/test/linker/security_integration_spec.ts index 1b7ab43223..bda6fdf177 100644 --- a/modules/@angular/core/test/linker/security_integration_spec.ts +++ b/modules/@angular/core/test/linker/security_integration_spec.ts @@ -194,6 +194,19 @@ function declareTests({useJit}: {useJit: boolean}) { }); }); + itAsync( + 'should escape unsafe SVG attributes', + (tcb: TestComponentBuilder, async: AsyncTestCompleter) => { + let tpl = `Text`; + tcb = tcb.overrideView( + SecuredComponent, new ViewMetadata({template: tpl, directives: []})); + PromiseWrapper.catchError(tcb.createAsync(SecuredComponent), (e) => { + expect(e.message).toContain(`Can't bind to 'xlink:href'`); + async.done(); + return null; + }); + }); + itAsync( 'should escape unsafe HTML values', (tcb: TestComponentBuilder, async: AsyncTestCompleter) => {