Move xlink:href test to the proper file
This commit is contained in:
parent
b39f4f683d
commit
2469505b1b
1 changed files with 20 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ o.spec("attributes", function() {
|
|||
o(canvas.dom.width).equals(100)
|
||||
})
|
||||
})
|
||||
o.spec("svg class", function() {
|
||||
o.spec("svg", function() {
|
||||
o("when className is specified then it should be added as a class", function() {
|
||||
var a = {tag: "svg", attrs: {className: "test"}}
|
||||
|
||||
|
|
@ -357,7 +357,26 @@ o.spec("attributes", function() {
|
|||
|
||||
o(a.dom.attributes["class"].value).equals("test")
|
||||
})
|
||||
o("removes xlink:href", function() {
|
||||
var vnode = {tag: "svg", ns: "http://www.w3.org/2000/svg", children: [
|
||||
{tag: "a", ns: "http://www.w3.org/2000/svg", attrs: {"xlink:href": "javascript:;"}}
|
||||
]}
|
||||
render(root, [vnode])
|
||||
|
||||
o(vnode.dom.nodeName).equals("svg")
|
||||
o(vnode.dom.firstChild.attributes["xlink:href"].value).equals("javascript:;")
|
||||
o(vnode.dom.firstChild.attributes["xlink:href"].namespaceURI).equals("http://www.w3.org/1999/xlink")
|
||||
|
||||
vnode = {tag: "svg", ns: "http://www.w3.org/2000/svg", children: [
|
||||
{tag: "a", ns: "http://www.w3.org/2000/svg", attrs: {}}
|
||||
]}
|
||||
render(root, [vnode])
|
||||
|
||||
o(vnode.dom.nodeName).equals("svg")
|
||||
o(vnode.dom.firstChild.attributes["xlink:href"]).equals(undefined)
|
||||
})
|
||||
})
|
||||
|
||||
o.spec("option.value", function() {
|
||||
o("can be set as text", function() {
|
||||
var a = {tag: "option", attrs: {value: "test"}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue