| OLD | NEW | 
|   1 <html> |   1 <html> | 
|   2 <head> |   2 <head> | 
|   3 <script src="../../resources/js-test.js"></script> |   3 <script src="../../resources/js-test.js"></script> | 
|   4 </head> |   4 </head> | 
|   5 <body> |   5 <body> | 
|   6 <p>This page tests calling document.importNode.</p> |   6 <p>This page tests calling document.importNode.</p> | 
|   7 <div id='console'></div> |   7 <div id='console'></div> | 
|   8 <script> |   8 <script> | 
|   9 var imported; |   9 var imported; | 
|  10  |  10  | 
|  11 if (window.testRunner) |  11 if (window.testRunner) | 
|  12     testRunner.dumpAsText(); |  12     testRunner.dumpAsText(); | 
|  13  |  13  | 
|  14 var d = document.createElement("div"); |  14 var d = document.createElement("div"); | 
|  15 d.innerHTML = "<span>hello </span><span>world</span>"; |  15 d.innerHTML = "<span>hello </span><span>world</span>"; | 
|  16  |  16  | 
|  17 imported = document.importNode(d); |  17 imported = document.importNode(d); | 
|  18 shouldBe('imported.childNodes.length','2'); |  18 shouldBe('imported.childNodes.length','0'); | 
|  19 shouldBeTrue("imported.textContent == 'hello world'"); |  19 shouldBeTrue("imported.textContent == ''"); | 
|  20  |  20  | 
|  21 imported = document.importNode(d, true); |  21 imported = document.importNode(d, true); | 
|  22 shouldBe('imported.childNodes.length','2'); |  22 shouldBe('imported.childNodes.length','2'); | 
|  23 shouldBeTrue("imported.textContent == 'hello world'"); |  23 shouldBeTrue("imported.textContent == 'hello world'"); | 
|  24  |  24  | 
|  25 imported = document.importNode(d, false); |  25 imported = document.importNode(d, false); | 
|  26 shouldBe('imported.childNodes.length','0'); |  26 shouldBe('imported.childNodes.length','0'); | 
|  27 shouldBeTrue("imported.textContent == ''"); |  27 shouldBeTrue("imported.textContent == ''"); | 
|  28  |  28  | 
|  29 </script> |  29 </script> | 
|  30 </body> |  30 </body> | 
|  31 </html> |  31 </html> | 
| OLD | NEW |