This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Two svg compile tests fail in Chrome 54 #15333
Copy link
Copy link
Closed
Milestone
Description
These two tests fail in Chrome 54 and Win 10.
angular.js/test/ng/compileSpec.js
Lines 442 to 467 in 5cce6e2
if (supportsForeignObject()) { | |
it('should handle foreignObject', inject(function() { | |
element = jqLite('<div><svg-container>' + | |
'<foreignObject width="100" height="100"><div class="test" style="position:absolute;width:20px;height:20px">test</div></foreignObject>' + | |
'</svg-container></div>'); | |
$compile(element.contents())($rootScope); | |
document.body.appendChild(element[0]); | |
var testElem = element.find('div'); | |
expect(isHTMLElement(testElem[0])).toBe(true); | |
var bounds = testElem[0].getBoundingClientRect(); | |
expect(bounds.width === 20 && bounds.height === 20).toBe(true); | |
})); | |
it('should handle custom svg containers that transclude to foreignObject that transclude html', inject(function() { | |
element = jqLite('<div><svg-container>' + | |
'<my-foreign-object><div class="test" style="width:20px;height:20px">test</div></my-foreign-object>' + | |
'</svg-container></div>'); | |
$compile(element.contents())($rootScope); | |
document.body.appendChild(element[0]); | |
var testElem = element.find('div'); | |
expect(isHTMLElement(testElem[0])).toBe(true); | |
var bounds = testElem[0].getBoundingClientRect(); | |
expect(bounds.width === 20 && bounds.height === 20).toBe(true); | |
})); |