Source code

Revision control

Other Tools

Test Info:

<head>
<title> document.title and space normalization </title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(function() {
// Single space characters must be normalized. (WHATWG r4353)
assert_equals(document.title, "document.title and space normalization");
document.title = "one space";
assert_equals(document.title, "one space");
document.title = "two spaces";
assert_equals(document.title, "two spaces");
document.title = "one\ttab";
assert_equals(document.title, "one tab");
document.title = "two\t\ttabs";
assert_equals(document.title, "two tabs");
document.title = "one\nnewline";
assert_equals(document.title, "one newline");
document.title = "two\n\nnewlines";
assert_equals(document.title, "two newlines");
document.title = "one\fform feed";
assert_equals(document.title, "one form feed");
document.title = "two\f\fform feeds";
assert_equals(document.title, "two form feeds");
document.title = "one\rcarriage return";
assert_equals(document.title, "one carriage return");
document.title = "two\r\rcarriage returns";
assert_equals(document.title, "two carriage returns");
});
</script>
</body>
</html>