michael@0: michael@0: michael@0: michael@0: michael@0: Test XHTML serializer with entities and selection michael@0: michael@0: michael@0: michael@0: michael@0: Mozilla Bug 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: 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:
michael@0:
michael@0: michael@0:
This is a draggable bit of text.
michael@0: michael@0:
michael@0:
michael@0: michael@0:
    michael@0:
  1. Lorem ipsum dolor
  2. michael@0:
  3. sit amet, consectetuer
  4. michael@0:
  5. adipiscing elit
  6. michael@0:
  7. Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class
  8. michael@0:
  9. aptent taciti
  10. michael@0:
michael@0: michael@0: michael@0:
michael@0: michael@0:
michael@0: michael@0: