24 lines
616 B
HTML
24 lines
616 B
HTML
|
<!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\">/* & < > \" */</style>");
|
|||
|
</script>
|
|||
|
</body>
|
|||
|
</html>
|