Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit a67cf37

Browse files
committed
Removes an irrelevant test; moves test tree removal behind post-test hook assertions.
1 parent 9c89b27 commit a67cf37

1 file changed

Lines changed: 2 additions & 22 deletions

File tree

tests/ShadowDOM/html/activeElement.html

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@
9797
});
9898

9999
teardown(function() {
100-
document.body.removeChild(r);
101-
102100
assert.equal(r_0_0.shadowRoot.activeElement, null);
103101
assert.equal(r_0_1.shadowRoot.activeElement, null);
104102
assert.equal(r_1_0.shadowRoot.activeElement, null);
105103
assert.equal(r_1_1.shadowRoot.activeElement, null);
104+
105+
document.body.removeChild(r);
106106
});
107107

108108

@@ -242,26 +242,6 @@
242242
assert.equal(r_0.shadowRoot.activeElement, null);
243243
assert.equal(r_1.shadowRoot.activeElement, r_1_1_l);
244244
});
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-
});
265245
});
266246

267247
</script>

0 commit comments

Comments
 (0)