| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <div id="container"> | 4 <div id="container"> |
| 5 <p>This test crashes if ASSERT is enabled and | 5 <p>This test crashes if ASSERT is enabled and |
| 6 the shadow DOM distribution is not properly updated before composed tree
traversals. | 6 the shadow DOM distribution is not properly updated before flat tree tra
versals. |
| 7 </div> | 7 </div> |
| 8 <script> | 8 <script> |
| 9 setup({ explicit_done: true }); | 9 setup({ explicit_done: true }); |
| 10 | 10 |
| 11 function setNeedsDistributionRecalc() { | 11 function setNeedsDistributionRecalc() { |
| 12 var element = document.createElement("div"); | 12 var element = document.createElement("div"); |
| 13 container.appendChild(element); | 13 container.appendChild(element); |
| 14 var shadowRoot = element.createShadowRoot(); | 14 var shadowRoot = element.createShadowRoot(); |
| 15 } | 15 } |
| 16 | 16 |
| 17 test(function () { | 17 test(function () { |
| 18 setNeedsDistributionRecalc(); | 18 setNeedsDistributionRecalc(); |
| 19 document.fonts.load("1em ahem") | 19 document.fonts.load("1em ahem") |
| 20 .then(function () { | 20 .then(function () { |
| 21 if (window.testRunner) | 21 if (window.testRunner) |
| 22 container.style.display = "none"; | 22 container.style.display = "none"; |
| 23 done(); | 23 done(); |
| 24 }); | 24 }); |
| 25 }, "document.fonts.load() when needsDistributionRecalc"); | 25 }, "document.fonts.load() when needsDistributionRecalc"); |
| 26 </script> | 26 </script> |
| OLD | NEW |