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