| var paragraph = document.createElement("p"); |
| paragraph.appendChild(document.createTextNode(message)); |
| document.getElementById("console").appendChild(paragraph); |
| function expect(expected, actual) |
| var msg = "Expected " + expected + ", got " + actual + ": "; |
| window.testRunner.dumpAsText(); |
| expect(0, document.getElementsByTagName('title').length); |
| document.title = 'Document title'; |
| expect(1, document.getElementsByTagName('title').length); |
| <p>Test that setting document.title creates a title element and appends it to the documents head if one does not already exist, as |
| per <a href='http://whatwg.org/specs/web-apps/current-work/#the-title1'>http://whatwg.org/specs/web-apps/current-work/#the-title1</a>.</p> |