Test SVG update element with tag change

Currently failing. Updating an SVG element which tag changes
actually results in an unknown HTML element.
This commit is contained in:
Thibault Duplessis 2016-11-13 11:30:22 +01:00
parent 0fad68fa69
commit d539c515ea

View file

@ -211,6 +211,19 @@ o.spec("updateElement", function() {
o(updated.dom.attributes["class"].nodeValue).equals("b")
})
o("updates svg child", function() {
var vnode = {tag: "svg", children: [{
tag: 'circle'
}]}
var updated = {tag: "svg", children: [{
tag: 'line'
}]}
render(root, [vnode])
render(root, [updated])
o(updated.dom.firstChild.namespaceURI).equals("http://www.w3.org/2000/svg")
})
o("restores correctly when recycling", function() {
var vnode = {tag: "div", key: 1}
var updated = {tag: "div", key: 2}