| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src='../resources/testharness.js'></script> |
| 3 <script src='../resources/testharnessreport.js'></script> |
| 4 <script src='resources/shadow-dom.js'></script> |
| 5 <script src='resources/focus-utils.js'></script> |
| 6 <div id="log"></div> |
| 7 <!-- |
| 8 This test case is based on the crbug.com/618587 reproduction case: |
| 9 http://jsbin.com/bonudiwagu/1/edit?html,output |
| 10 --> |
| 11 <input id='i0'> |
| 12 <div id='x-foo'> |
| 13 <template data-mode='open'> |
| 14 <input id='inner-before'> |
| 15 <slot></slot> |
| 16 <input id='inner-after'> |
| 17 </template> |
| 18 <div id='nested'> |
| 19 <template data-mode='open'> |
| 20 <input id='nested-x'> |
| 21 <slot></slot> |
| 22 <input id='nested-y'> |
| 23 </template> |
| 24 <input id='light'> |
| 25 </div> |
| 26 </div> |
| 27 <input id='i1'> |
| 28 |
| 29 <script> |
| 30 test(function() { |
| 31 var xFoo = document.querySelector('#x-foo'); |
| 32 convertTemplatesToShadowRootsWithin(xFoo); |
| 33 |
| 34 var elements = [ |
| 35 'i0', |
| 36 'x-foo/inner-before', |
| 37 'nested/nested-x', |
| 38 'light', |
| 39 'nested/nested-y', |
| 40 'x-foo/inner-after', |
| 41 'i1' |
| 42 ]; |
| 43 |
| 44 assert_focus_navigation_forward(elements); |
| 45 elements.reverse(); |
| 46 assert_focus_navigation_backward(elements); |
| 47 }, 'Focus controller should treat each slot as a focus scope.'); |
| 48 </script> |
| OLD | NEW |