2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / title-text-property.html
blob9446a4153db6f4302cf8381e580f8aac78d937e5
1 <html>
2 <head>
3 <title>Original Title</title>
4 <script>
5 function debugOutput(str) {
6 text = document.createTextNode(str);
7 debugDiv = document.getElementById('debugDiv');
8 div = document.createElement ('div');
9 div.appendChild(text);
10 debugDiv.appendChild(div);
13 function runTests() {
14 if (window.layoutTestController) {
15 layoutTestController.dumpAsText();
16 layoutTestController.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);
29 function test() {
30 t = document.getElementsByTagName('title').item(0);
31 alert (t.text);
32 t.text = 'new title';
33 alert (t.text);
35 </script>
36 </head>
37 <body onload='runTests();'>
38 <div id='debugDiv'>
39 </div>
40 </body>
41 </html>