blob: b764e6ac76e0a00b23822ba39e5e77326fbfa94b [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div id="description">This test checks to see if setting innerHTML to a single non-breaking space works.</div>
<div id="test" style="display:none"></div>
<div id="console"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(message) {
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message));
console.appendChild(document.createElement('br'));
}
var html = "\u00A0";
var testElement = document.getElementById("test");
try {
testElement.innerHTML = html;
} catch(e) {
log("FAIL, exception thrown: " + e);
}
if (html == testElement.innerHTML)
log("PASSED");
else {
log("FAIL, expected: " + html + " actual: " + testElement.innerHTML);
}
</script>
</body>
</html>