| <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.waitUntilDone(); |
| 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 + '\''); |
| |
| internals.queueTask("DOMManipulation", () => testRunner.notifyDone()); |
| } |
| </script> |
| </head> |
| <body onload='runTests();'> |
| <div id='console'> |
| </div> |
| </body> |
| </html> |