michael@0: michael@0: michael@0: michael@0:
michael@0:michael@0: '; michael@0: is(out, expected, "test short attr #4"); michael@0: michael@0: node = document.getElementById('shortattr5'); michael@0: encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw); michael@0: encoder.setNode(node); michael@0: out = encoder.encodeToString(); michael@0: expected = ''; michael@0: is(out, expected, "test short attr #5"); michael@0: michael@0: node = document.getElementById('shortattr6'); michael@0: encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw); michael@0: encoder.setNode(node); michael@0: out = encoder.encodeToString(); michael@0: expected = 'michael@0: michael@0: michael@0: michael@0: michael@0: michael@0:
'; michael@0: is(out, expected, "test short attr #6"); michael@0: michael@0: node = document.getElementById('shortattr7'); michael@0: encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw); michael@0: encoder.setNode(node); michael@0: out = encoder.encodeToString(); michael@0: expected = ''; michael@0: is(out, expected, "test short attr #7"); michael@0: michael@0: // test on _moz and -moz attr michael@0: node = document.getElementById('mozattr'); michael@0: encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw); michael@0: encoder.setNode(node); michael@0: out = encoder.encodeToString(); michael@0: expected = 'lorem ipsum'; michael@0: is(out, expected, "test -moz/_moz attr"); michael@0: michael@0: node.setAttribute('_moz_c','barc'); michael@0: node.setAttribute('_-moz_d','bard'); michael@0: node.setAttribute('__moz_e','bare'); michael@0: michael@0: encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw); michael@0: encoder.setNode(node); michael@0: out = encoder.encodeToString(); michael@0: expected = 'lorem ipsum'; michael@0: is(out, expected, "test -moz/_moz attr #2"); michael@0: michael@0: SimpleTest.finish(); michael@0: } michael@0: michael@0: michael@0: SimpleTest.waitForExplicitFinish(); michael@0: michael@0: addLoadEvent(testHtmlSerializer_1); michael@0: //]]> michael@0: michael@0: