description('Various tests for the mark element.'); var testParent = document.createElement('div'); document.body.appendChild(testParent); debug('<p> closes <mark>:'); testParent.innerHTML = 'Test that

a p element

closes <mark>.

'; var paragraph1 = document.getElementById('paragraph1'); shouldBeFalse('paragraph1.parentNode.nodeName == "mark"'); debug('<b> does not close <mark>:'); testParent.innerHTML = 'Test that a b element does not close a mark element.'; var b1 = document.getElementById('b1'); shouldBe('b1.parentNode.nodeName', '"MARK"'); debug('Residual style:'); testParent.innerHTML = 'This text should be bold. This is also bold.'; function getWeight(id) { return document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue('font-weight'); } shouldBe('getWeight("mark2")', '"bold"'); shouldBe('getWeight("span1")', '"bold"'); document.body.removeChild(testParent);