From c4964e7c9b2084d1fd91d60dc05ef8d9fbdb5b81 Mon Sep 17 00:00:00 2001 From: mlaval Date: Thu, 29 Oct 2015 14:38:35 +0100 Subject: [PATCH] fix(test): "integration tests svg should support svg elements" fails in non-Chrome browsers Fixes #4987 Closes #5000 --- modules/angular2/test/core/linker/integration_spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/angular2/test/core/linker/integration_spec.ts b/modules/angular2/test/core/linker/integration_spec.ts index 383dcc8ed5..b801211df4 100644 --- a/modules/angular2/test/core/linker/integration_spec.ts +++ b/modules/angular2/test/core/linker/integration_spec.ts @@ -1758,7 +1758,15 @@ export function main() { .toEqual('http://www.w3.org/2000/svg'); expect(DOM.getProperty(use, 'namespaceURI')) .toEqual('http://www.w3.org/2000/svg'); - expect(DOM.getOuterHTML(use)).toContain('xmlns:xlink'); + + if (!IS_DART) { + var firstAttribute = DOM.getProperty(use, 'attributes')[0]; + expect(firstAttribute.name).toEqual('xlink:href'); + expect(firstAttribute.namespaceURI).toEqual('http://www.w3.org/1999/xlink'); + } else { + // For Dart where '_Attr' has no instance getter 'namespaceURI' + expect(DOM.getOuterHTML(use)).toContain('xmlns:xlink'); + } async.done(); });