This tests the activeElement property of a ShadowRoot. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS shadowRoot1.activeElement is defined. PASS shadowRoot2.activeElement is defined. PASS nodeInDocument.focus(); document.activeElement is nodeInDocument PASS nodeInDocument.focus(); shadowRoot1.activeElement is null PASS nodeInDocument.focus(); shadowRoot2.activeElement is null PASS distributedLightChild.focus(); document.activeElement is distributedLightChild PASS distributedLightChild.focus(); shadowRoot1.activeElement is distributedLightChild PASS distributedLightChild.focus(); shadowRoot2.activeElement is null PASS childInShadowRoot1.focus(); document.activeElement is shadowHost1 PASS childInShadowRoot1.focus(); shadowRoot1.activeElement is childInShadowRoot1 PASS childInShadowRoot1.focus(); shadowRoot2.activeElement is null PASS childInShadowRoot2.focus(); document.activeElement is shadowHost1 PASS childInShadowRoot2.focus(); shadowRoot1.activeElement is shadowHost2 PASS childInShadowRoot2.focus(); shadowRoot2.activeElement is childInShadowRoot2 childInShadowRoot2.blur(); PASS document.activeElement is document.body PASS shadowRoot1.activeElement is null PASS shadowRoot2.activeElement is null PASS successfullyParsed is true TEST COMPLETE