diff -r 000000000000 -r 6474c204b198 content/base/test/test_bug422403-2.xhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/base/test/test_bug422403-2.xhtml Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,289 @@ + + + + + Test XHTML serializer with entities and selection + + + + +Mozilla Bug +

+ +
+';
+  is(out, expected, "test short attr #4");
+
+  node = document.getElementById('shortattr5');
+  encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw);
+  encoder.setNode(node);
+  out = encoder.encodeToString();
+  expected = '';
+  is(out, expected, "test short attr #5");
+
+  node = document.getElementById('shortattr6');
+  encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw);
+  encoder.setNode(node);
+  out = encoder.encodeToString();
+  expected = '
'; + is(out, expected, "test short attr #6"); + + node = document.getElementById('shortattr7'); + encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw); + encoder.setNode(node); + out = encoder.encodeToString(); + expected = '
'; + is(out, expected, "test short attr #7"); + + // test on _moz and -moz attr + node = document.getElementById('mozattr'); + encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw); + encoder.setNode(node); + out = encoder.encodeToString(); + expected = '
lorem ipsum
'; + is(out, expected, "test -moz/_moz attr"); + + node.setAttribute('_moz_c','barc'); + node.setAttribute('_-moz_d','bard'); + node.setAttribute('__moz_e','bare'); + + encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw); + encoder.setNode(node); + out = encoder.encodeToString(); + expected = '
lorem ipsum
'; + is(out, expected, "test -moz/_moz attr #2"); + + SimpleTest.finish(); +} + + +SimpleTest.waitForExplicitFinish(); + +addLoadEvent(testHtmlSerializer_1); +//]]> + +
+
+ +
This is a draggable bit of text.
+ +
+
+ +
    +
  1. Lorem ipsum dolor
  2. +
  3. sit amet, consectetuer
  4. +
  5. adipiscing elit
  6. +
  7. Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class
  8. +
  9. aptent taciti
  10. +
+ + +
+ +
+ +