4 <title>document.title with head blown away
</title>
5 <link rel=
"author" title=
"Ms2ger" href=
"mailto:ms2ger@gmail.com">
6 <link rel=
"help" href=
"http://www.whatwg.org/html5/#document.title">
7 <script src=
"../../../resources/testharness.js"></script>
8 <script src=
"../../../resources/testharnessreport.js"></script>
9 <link rel=
"stylesheet" href=
"../../../resources/testharness.css">
14 assert_equals(document
.title
, "document.title with head blown away");
17 var head
= document
.getElementsByTagName("head")[0];
18 assert_true(!!head
, "Head gone?!")
19 head
.parentNode
.removeChild(head
);
20 assert_false(!!document
.getElementsByTagName("head")[0], "Head still there?!")
21 document
.title
= "FAIL";
22 assert_equals(document
.title
, "");
25 var title2
= document
.createElement("title");
26 title2
.appendChild(document
.createTextNode("PASS"));
27 document
.body
.appendChild(title2
);
28 assert_equals(document
.title
, "PASS");
31 var title3
= document
.createElement("title");
32 title3
.appendChild(document
.createTextNode("PASS2"));
33 document
.documentElement
.insertBefore(title3
, document
.body
);
34 assert_equals(document
.title
, "PASS2");