| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>aaa</title> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body onload="runTest()"> |
| <script> |
| description("Tests that setting document.title does not reuse title's text node child"); |
| jsTestIsAsync = true; |
| |
| function runTest() |
| { |
| oldTextNode = document.getElementsByTagName("title")[0].firstChild; |
| shouldBeEqualToString("document.title", "aaa"); |
| shouldBeEqualToString("oldTextNode.textContent", "aaa"); |
| evalAndLog("document.title = 'bbb'"); |
| shouldBeEqualToString("oldTextNode.textContent", "aaa"); |
| newTextNode = document.getElementsByTagName("title")[0].firstChild; |
| shouldNotBe("oldTextNode", "newTextNode"); |
| shouldBeEqualToString("document.title", "bbb"); |
| shouldBeEqualToString("newTextNode.textContent", "bbb"); |
| |
| finishJSTest(); |
| } |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |