Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / HTMLDocument / clone-node.html
1 <!-- quirks mode -->
2 <title>Tests HTMLDocument cloneNode</title>
3 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode">
4 <script src="../../../resources/js-test.js"></script>
5 <script>
6 description('Tests cloneNode for HTMLDocument.');
7
8 function className(object) {
9     return Object.prototype.toString.call(object).slice(8, -1);
10 }
11
12 shouldBe('document.cloneNode(false).__proto__', 'HTMLDocument.prototype');
13 shouldBeEqualToString('className(document.cloneNode(false))', 'HTMLDocument');
14 shouldBe('document.cloneNode(true).title', 'document.title');
15 shouldBeEqualToString('document.cloneNode(true).compatMode', 'BackCompat');
16 shouldBeEqualToString('document.cloneNode(true).contentType', 'text/html');
17
18 var doc = document.implementation.createHTMLDocument('title');
19 shouldBe('doc.cloneNode(false).__proto__', 'HTMLDocument.prototype');
20 shouldBeEqualToString('className(doc.cloneNode(false))', 'HTMLDocument');
21 shouldBe('doc.cloneNode(true).title', 'doc.title');
22 shouldBeEqualToString('doc.cloneNode(true).compatMode', 'CSS1Compat');
23 shouldBeEqualToString('doc.cloneNode(true).contentType', 'text/html');
24
25 </script>
26 </body>