haikuwebkit/LayoutTests/fast/dom/xmlserializer-ampersand-in-...

24 lines
616 B
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<style></style>
</head>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("Tests XML serialization of ampersand in a style element.");
style = document.querySelector('style');
function testXMLSerialization(input, expected)
{
debug("Test case: " + input);
style.innerText = input;
result = (new XMLSerializer()).serializeToString(style);
shouldBeEqualToString("result", "" + expected);
}
testXMLSerialization("/* & < > \"  */", "<style xmlns=\"http://www.w3.org/1999/xhtml\">/* &amp; &lt; &gt; \"  */</style>");
</script>
</body>
</html>