Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Document / title-property-creates-title-element.html
blob62b4236d90015398d47268e60d310f4053e80a76
1 <html>
2 <head>
3 <script>
4 function log(message)
6 var paragraph = document.createElement("p");
7 paragraph.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(paragraph);
11 function expect(expected, actual)
13 var msg = "Expected " + expected + ", got " + actual + ": ";
14 if (expected == actual)
15 log(msg + "PASS");
16 else
17 log(msg + "FAIL");
20 function test()
22 if (window.testRunner)
23 window.testRunner.dumpAsText();
25 expect(0, document.getElementsByTagName('title').length);
26 document.title = 'Document title';
27 expect(1, document.getElementsByTagName('title').length);
29 </script>
30 </head>
31 <body>
32 <p>Test that setting document.title creates a title element and appends it to the documents head if one does not already exist, as
33 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>
34 <hr>
35 <div id='console'/>
36 <script>
37 test();
38 </script>
39 </body>
40 </html>