blob: 4b6550655e501b7d14c9f10efbc1d0cc961750ca [file] [log] [blame]
<html>
<head>
<title>Original Title</title>
<script>
function debugOutput(str) {
text = document.createTextNode(str);
console = document.getElementById('console');
div = document.createElement('div');
div.appendChild(text);
console.appendChild(div);
}
function runTests() {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpTitleChanges();
}
titleElem = document.getElementsByTagName('title').item(0);
debugOutput('Original title is: \'' + titleElem.text + '\'');
newTitle = 'This is the new title';
debugOutput('Setting new title to: \'' + newTitle + '\'');
titleElem.text = newTitle;
debugOutput('New title is: \'' + titleElem.text + '\'');
}
function test() {
t = document.getElementsByTagName('title').item(0);
alert(t.text);
t.text = 'new title';
alert(t.text);
}
</script>
</head>
<body onload='runTests();'>
<div id='console'>
</div>
</body>
</html>