Revert "Revert "More performance improvements + etc.""

This commit is contained in:
Isiah Meadows 2015-12-16 11:04:07 -05:00
parent 897060d6ed
commit b2faa43f91
28 changed files with 3207 additions and 1326 deletions

View file

@ -29,7 +29,9 @@ describe("m.trust()", function () {
it("works with mixed trusted content in div", function () {
var root = document.createElement("div")
m.render(root, [m.trust("<p>1</p><p>2</p>"), m("i", "foo")])
expect(root.childNodes[2].tagName).to.equal("I")
// Case-insensitive test to work around weird heisenbug with the
// browser
expect(root.childNodes[2].tagName).to.equalIgnoreCase("I")
})
it("works with mixed trusted content in text nodes", function () {
@ -38,7 +40,9 @@ describe("m.trust()", function () {
m.trust("<p>1</p>123<p>2</p>"),
m("i", "foo")
])
expect(root.childNodes[3].tagName).to.equal("I")
// Case-insensitive test to work around weird heisenbug with the
// browser
expect(root.childNodes[3].tagName).to.equalIgnoreCase("I")
})
// FIXME: this is a bug (trusted string's contents rendered as just
@ -52,7 +56,9 @@ describe("m.trust()", function () {
m("td", "foo")
])
expect(root.childNodes[2].tagName).to.equal("TD")
// Case-insensitive test to work around weird heisenbug with the
// browser
expect(root.childNodes[2].tagName).to.equalIgnoreCase("TD")
})
})
})