blob: e51399ea5e63db69ffad59794ea8d9fbb6a0578a [file] [log] [blame]
<!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>