3 <title>Original Title
</title>
5 function debugOutput(str
) {
6 text
= document
.createTextNode(str
);
7 console
= document
.getElementById('console');
8 div
= document
.createElement('div');
10 console
.appendChild(div
);
14 if (window
.testRunner
) {
15 testRunner
.dumpAsText();
16 testRunner
.dumpTitleChanges();
19 titleElem
= document
.getElementsByTagName('title').item(0);
20 debugOutput('Original title is: \'' + titleElem
.text
+ '\'');
22 newTitle
= 'This is the new title';
23 debugOutput('Setting new title to: \'' + newTitle
+ '\'');
24 titleElem
.text
= newTitle
;
26 debugOutput('New title is: \'' + titleElem
.text
+ '\'');
30 t
= document
.getElementsByTagName('title').item(0);
37 <body onload='runTests();'
>