blob: 383db81b6a9777e388afa524158b373f4341dbd8 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
</head>
<body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
document.write("<p>Initial</p>");
document.write("<p>&nbsp;document.charset: " + document.charset + "</p>");
document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p>");
document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "</p>");
document.write("<p>Setting charset to UTF-8 (expected to fail as it is read-only)</p>");
try {
document.charset = "utf-8";
document.write("<p>&nbsp;document.charset: " + document.charset + "</p>");
document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p>");
document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "</p>");
} catch (ex) {
document.write("<p>Failure (expected)</p>");
}
document.write("<p>Setting characterSet to UTF-8 (expected to fail as it is read-only)</p>");
try {
document.characterSet = "utf-8";
document.write("<p>&nbsp;document.charset: " + document.charset + "</p>");
document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p>");
document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "</p>");
} catch (ex) {
document.write("<p>Failure (expected)</p>");
}
</script>
</body>
<html>