OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode"> | 2 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode"> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 description('Tests cloneNode for SVGDocument.'); | 6 description('Tests cloneNode for SVGDocument.'); |
7 | 7 |
8 function className(object) { | 8 function className(object) { |
9 return Object.prototype.toString.call(object).slice(8, -1); | 9 return Object.prototype.toString.call(object).slice(8, -1); |
10 } | 10 } |
11 | 11 |
12 var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg'
, 'svg', null); | 12 var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg'
, 'svg', null); |
13 | 13 |
14 shouldBe('svgDoc.cloneNode(false).__proto__', 'SVGDocument.prototype'); | 14 shouldBe('svgDoc.cloneNode(false).__proto__', 'XMLDocument.prototype'); |
15 shouldBeEqualToString('className(svgDoc.cloneNode(false))', 'SVGDocument'); | 15 shouldBeEqualToString('className(svgDoc.cloneNode(false))', 'XMLDocument'); |
16 shouldBeEqualToString('svgDoc.cloneNode(true).compatMode', 'CSS1Compat'); | 16 shouldBeEqualToString('svgDoc.cloneNode(true).compatMode', 'CSS1Compat'); |
17 | 17 |
18 </script> | 18 </script> |
OLD | NEW |