| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="resources/shadow-dom.js"></script> | 5 <script src="resources/shadow-dom.js"></script> |
| 6 <script> | 6 <script> |
| 7 if (window.testRunner) | 7 if (window.testRunner) |
| 8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
| 9 | 9 |
| 10 description("Test for crbug.com/321495: if no crash occurs, this test passes. Ot
herwise, fails."); | 10 description("Test for crbug.com/321495: if no crash occurs, this test passes. Ot
herwise, fails."); |
| 11 | 11 |
| 12 var youngerShadowRoot, olderShadowRoot, style; | 12 var youngerShadowRoot, olderShadowRoot, style; |
| 13 | 13 |
| 14 function runTest() { | 14 function runTest() { |
| 15 document.getElementById('sandbox').appendChild( | 15 document.getElementById('sandbox').appendChild( |
| 16 createDOM('div', {'id': 'host'}, | 16 createDOM('div', {'id': 'host'}, |
| 17 createShadowRoot(), | 17 createShadowRoot(), |
| 18 createShadowRoot( | 18 createShadowRoot( |
| 19 createDOM('div', {'id': 'child'}, | 19 createDOM('div', {'id': 'child'}, |
| 20 createDOM('style', {'id': 'style', 'scoped': 'scoped'}, | 20 createDOM('style', {'id': 'style', 'scoped': 'scoped'}, |
| 21 document.createTextNode('.c3 { display: inherit; -webkit
-transform: rotate3d(0, 1, 1, 45deg); }')))))); | 21 document.createTextNode('.c3 { display: inherit; transfo
rm: rotate3d(0, 1, 1, 45deg); }')))))); |
| 22 | 22 |
| 23 olderShadowRoot = getNodeInTreeOfTrees("host/"); | 23 olderShadowRoot = getNodeInTreeOfTrees("host/"); |
| 24 youngerShadowRoot = getNodeInTreeOfTrees("host//"); | 24 youngerShadowRoot = getNodeInTreeOfTrees("host//"); |
| 25 style = youngerShadowRoot.getElementById('style'); | 25 style = youngerShadowRoot.getElementById('style'); |
| 26 | 26 |
| 27 olderShadowRoot.appendChild(youngerShadowRoot.getElementById('child')); | 27 olderShadowRoot.appendChild(youngerShadowRoot.getElementById('child')); |
| 28 setTimeout('youngerShadowRoot.appendChild(style);', 0); | 28 setTimeout('youngerShadowRoot.appendChild(style);', 0); |
| 29 } | 29 } |
| 30 </script> | 30 </script> |
| 31 </head> | 31 </head> |
| 32 <body onload="runTest()"> | 32 <body onload="runTest()"> |
| 33 <div class="c3"></div> | 33 <div class="c3"></div> |
| 34 <div id="sandbox"></div> | 34 <div id="sandbox"></div> |
| 35 <pre id="console"></pre> | 35 <pre id="console"></pre> |
| 36 </body> | 36 </body> |
| 37 </html> | 37 </html> |
| OLD | NEW |