| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body> | 2 <body> |
| 3 <script src="../../../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <div id="log"></div> | 5 <div id="log"></div> |
| 6 <script> | 6 <script> |
| 7 test(function() { | 7 test(function() { |
| 8 var host = document.createElement('div'); | 8 var host = document.createElement('div'); |
| 9 var root = host.attachShadow({mode: 'open'}); | 9 var root = host.attachShadow({mode: 'open'}); |
| 10 root.innerHTML = '<input id="i1"><label for="i1"></label>'; | 10 root.innerHTML = '<input id="i1"><label for="i1"></label>'; |
| 11 assert_equals(root.firstChild.labels.length, 1); | 11 assert_equals(root.firstChild.labels.length, 1); |
| 12 | 12 |
| 13 document.body.appendChild(host); | 13 document.body.appendChild(host); |
| 14 assert_equals(root.firstChild.labels.length, 1); | 14 assert_equals(root.firstChild.labels.length, 1); |
| 15 }, 'LabelsNodeList should work in Shadow DOM.'); | 15 }, 'LabelsNodeList should work in Shadow DOM.'); |
| 16 </script> | 16 </script> |
| OLD | NEW |