| 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 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <input id="input1"></input> | 8 <input id="input1"></input> |
| 9 <div id="sandbox"></div> | 9 <div id="sandbox"></div> |
| 10 <div id="console"></div> | 10 <div id="console"></div> |
| 11 <script> | 11 <script> |
| 12 if (window.testRunner) | |
| 13 testRunner.dumpAsText(); | |
| 14 | |
| 15 var sandbox = document.getElementById('sandbox'); | 12 var sandbox = document.getElementById('sandbox'); |
| 16 | 13 |
| 17 // A test for a non-distributed node. | 14 // A test for a non-distributed node. |
| 18 sandbox.appendChild( | 15 sandbox.appendChild( |
| 19 createDOM('div', {'id': 'host'}, | 16 createDOM('div', {'id': 'host'}, |
| 20 createDOM('input', {'id': 'non-distributed-node'}), | 17 createDOM('input', {'id': 'non-distributed-node'}), |
| 21 createShadowRoot({'id': 'shadow-root'}))); | 18 createShadowRoot({'id': 'shadow-root'}))); |
| 22 sandbox.offsetLeft; | 19 sandbox.offsetLeft; |
| 23 | 20 |
| 24 document.getElementById('input1').focus(); | 21 document.getElementById('input1').focus(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 54 // This is a similar case where 'dispaly: none' is set to the focused element. W
e can't guarantee this case. | 51 // This is a similar case where 'dispaly: none' is set to the focused element. W
e can't guarantee this case. |
| 55 // The current implementation leaves the distributed node as document.activeElem
ent. | 52 // The current implementation leaves the distributed node as document.activeElem
ent. |
| 56 // See the discussion from https://code.google.com/p/chromium/issues/detail?id=3
18448#c21. | 53 // See the discussion from https://code.google.com/p/chromium/issues/detail?id=3
18448#c21. |
| 57 shouldBeEqualToString('document.activeElement.id', 'distributed-node'); | 54 shouldBeEqualToString('document.activeElement.id', 'distributed-node'); |
| 58 shouldBeNull('shadowRoot.activeElement'); | 55 shouldBeNull('shadowRoot.activeElement'); |
| 59 | 56 |
| 60 var successfullyParsed = true; | 57 var successfullyParsed = true; |
| 61 </script> | 58 </script> |
| 62 </body> | 59 </body> |
| 63 </html> | 60 </html> |
| OLD | NEW |