|
97 | 97 | }); |
98 | 98 |
|
99 | 99 | teardown(function() { |
100 | | - document.body.removeChild(r); |
101 | | - |
102 | 100 | assert.equal(r_0_0.shadowRoot.activeElement, null); |
103 | 101 | assert.equal(r_0_1.shadowRoot.activeElement, null); |
104 | 102 | assert.equal(r_1_0.shadowRoot.activeElement, null); |
105 | 103 | assert.equal(r_1_1.shadowRoot.activeElement, null); |
| 104 | + |
| 105 | + document.body.removeChild(r); |
106 | 106 | }); |
107 | 107 |
|
108 | 108 |
|
|
242 | 242 | assert.equal(r_0.shadowRoot.activeElement, null); |
243 | 243 | assert.equal(r_1.shadowRoot.activeElement, r_1_1_l); |
244 | 244 | }); |
245 | | - |
246 | | - test('focused element in different document', function() { |
247 | | - var docType = doc.implementation.createDocumentType( |
248 | | - 'html', '-//W3C//DTD XHTML 1.0 Transitional//EN', |
249 | | - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); |
250 | | - var otherDocument = doc.implementation.createDocument( |
251 | | - 'http://www.w3.org/1999/xhtml', 'html', docType); |
252 | | - otherDocument.documentElement.appendChild( |
253 | | - otherDocument.createElement('body')); |
254 | | - |
255 | | - var elt = otherDocument.createElement('div'); |
256 | | - otherDocument.body.appendChild(elt); |
257 | | - |
258 | | - ShadowDOMPolyfill.renderAllPending(); |
259 | | - |
260 | | - elt.focus(); |
261 | | - |
262 | | - var activeElement = doc.activeElement; |
263 | | - assert.isTrue(activeElement === null || activeElement === doc.body); |
264 | | - }); |
265 | 245 | }); |
266 | 246 |
|
267 | 247 | </script> |
|
0 commit comments