[render/render] Test for removing styles and assorted domMock changes
This commit is contained in:
parent
1fdc9278c7
commit
6283aa4a7d
3 changed files with 70 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ module.exports = function(options) {
|
|||
}
|
||||
}
|
||||
}
|
||||
cssText = buf.join(" ")
|
||||
element.setAttribute("style", cssText = buf.join(" "))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@ o.spec("domMock", function() {
|
|||
|
||||
o(div.style.backgroundColor).equals("red")
|
||||
o(div.style.borderBottom).equals("1px solid red")
|
||||
o(div.attributes.style.value).equals("background-color: red; border-bottom: 1px solid red;")
|
||||
})
|
||||
o("removing via setting style.cssText string works", function() {
|
||||
var div = $document.createElement("div")
|
||||
|
|
@ -625,6 +626,7 @@ o.spec("domMock", function() {
|
|||
div.style.cssText = ""
|
||||
|
||||
o(div.style.background).equals("")
|
||||
o(div.attributes.style.value).equals("")
|
||||
})
|
||||
o("the final semicolon is optional when setting style.cssText", function() {
|
||||
var div = $document.createElement("div")
|
||||
|
|
@ -632,6 +634,7 @@ o.spec("domMock", function() {
|
|||
|
||||
o(div.style.background).equals("red")
|
||||
o(div.style.cssText).equals("background: red;")
|
||||
o(div.attributes.style.value).equals("background: red;")
|
||||
})
|
||||
o("'cssText' as a property name is ignored when setting style.cssText", function(){
|
||||
var div = $document.createElement("div")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue