| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Shadow DOM: HTMLSlotElement interface</title> | 4 <title>Shadow DOM: HTMLSlotElement interface</title> |
| 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> | 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> |
| 6 <meta name="assert" content="HTMLSlotElement must exist on window with name attr
ibute and getAssignedNode() method"> | 6 <meta name="assert" content="HTMLSlotElement must exist on window with name attr
ibute and getAssignedNode() method"> |
| 7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#the-slot
-element"> | 7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#the-slot
-element"> |
| 8 <script src="../../../resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="../../../resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
| 10 </head> | 10 </head> |
| 11 <body> | 11 <body> |
| 12 <div id="log"></div> | 12 <div id="log"></div> |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 test(function () { | 15 test(function () { |
| 16 assert_true('HTMLSlotElement' in window, 'HTMLSlotElement must be defined on
window'); | 16 assert_true('HTMLSlotElement' in window, 'HTMLSlotElement must be defined on
window'); |
| 17 assert_equals(HTMLSlotElement.prototype.__proto__, HTMLElement.prototype, 'H
TMLSlotElement should inherit from HTMLElement'); | 17 assert_equals(HTMLSlotElement.prototype.__proto__, HTMLElement.prototype, 'H
TMLSlotElement should inherit from HTMLElement'); |
| 18 assert_true(document.createElement('slot') instanceof HTMLSlotElement, 'slot
element should be an instance of HTMLSlotElement'); | 18 assert_true(document.createElement('slot') instanceof HTMLSlotElement, 'slot
element should be an instance of HTMLSlotElement'); |
| 19 assert_true(document.createElement('slot') instanceof HTMLElement, 'slot ele
ment should be an instance of HTMLElement'); | 19 assert_true(document.createElement('slot') instanceof HTMLElement, 'slot ele
ment should be an instance of HTMLElement'); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 assert_array_equals(innerSlot.assignedNodes(), [outerSlot, innerChild], 'ass
ignedNodes() on a default slot must return the assigned nodes'); | 261 assert_array_equals(innerSlot.assignedNodes(), [outerSlot, innerChild], 'ass
ignedNodes() on a default slot must return the assigned nodes'); |
| 262 assert_array_equals(innerSlot.assignedNodes({flatten: false}), [outerSlot, i
nnerChild], 'assignedNodes({flatten: false}) on a default slot must return the a
ssigned nodes'); | 262 assert_array_equals(innerSlot.assignedNodes({flatten: false}), [outerSlot, i
nnerChild], 'assignedNodes({flatten: false}) on a default slot must return the a
ssigned nodes'); |
| 263 assert_array_equals(innerSlot.assignedNodes({flatten: true}), [outerChild, i
nnerChild], 'assignedNodes({flatten: true}) on a default slot must return the di
stributed nodes'); | 263 assert_array_equals(innerSlot.assignedNodes({flatten: true}), [outerChild, i
nnerChild], 'assignedNodes({flatten: true}) on a default slot must return the di
stributed nodes'); |
| 264 | 264 |
| 265 }, 'assignedNodes({flatten: true}) must return the distributed nodes, and assign
edNodes() and assignedNodes({flatten: false}) must returned the assigned nodes')
; | 265 }, 'assignedNodes({flatten: true}) must return the distributed nodes, and assign
edNodes() and assignedNodes({flatten: false}) must returned the assigned nodes')
; |
| 266 | 266 |
| 267 </script> | 267 </script> |
| 268 </body> | 268 </body> |
| 269 </html> | 269 </html> |
| OLD | NEW |