5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.dumpTitleChanges();
10 document
.title
= '1. setting document.title';
12 title
= document
.getElementsByTagName('title').item(0);
14 title
.text
= '2. setting title.text';
16 newTitle
= document
.createElement('title');
17 newTitle
.appendChild(document
.createTextNode('3. appending a new title node (should not trigger a title change)'));
19 document
.getElementsByTagName('head').item(0).appendChild(newTitle
);
21 // Remove both title elements
22 titleElements
= document
.getElementsByTagName('title');
23 while (titleElements
.length
) {
24 titleElement
= titleElements
[titleElements
.length
- 1];
25 titleElement
.parentNode
.removeChild(titleElement
);
29 <title>Initial title
</title>
31 <body onload=
"runTests();" >