Skip to content

Commit c4964e7

Browse files
committed
fix(test): "integration tests svg should support svg elements" fails in non-Chrome browsers
Fixes #4987 Closes #5000
1 parent 6815ace commit c4964e7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/angular2/test/core/linker/integration_spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,15 @@ export function main() {
17581758
.toEqual('http://www.w3.org/2000/svg');
17591759
expect(DOM.getProperty(<Element>use, 'namespaceURI'))
17601760
.toEqual('http://www.w3.org/2000/svg');
1761-
expect(DOM.getOuterHTML(<HTMLElement>use)).toContain('xmlns:xlink');
1761+
1762+
if (!IS_DART) {
1763+
var firstAttribute = DOM.getProperty(<Element>use, 'attributes')[0];
1764+
expect(firstAttribute.name).toEqual('xlink:href');
1765+
expect(firstAttribute.namespaceURI).toEqual('http://www.w3.org/1999/xlink');
1766+
} else {
1767+
// For Dart where '_Attr' has no instance getter 'namespaceURI'
1768+
expect(DOM.getOuterHTML(<HTMLElement>use)).toContain('xmlns:xlink');
1769+
}
17621770

17631771
async.done();
17641772
});

0 commit comments

Comments
 (0)