Skip to content

Commit

Permalink
Add failing test for shadow root mutation case
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 27, 2019
1 parent 2f9bf50 commit 69f9293
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/shadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,23 @@
}, 'Non-connected element cannot be a blocking element');
assert.equal(document.$blockingElements.top, null, 'element is not a blocking element');
});

/**
* Currently failing.
* See https://github.com/PolymerLabs/blocking-elements/issues/18
*/
it.skip('mutation to shadow root should inert siblings', function() {
// Make the first shadow root child blocking.
var shadowA = container.shadowRoot.querySelector('button');
document.$blockingElements.push(shadowA);
// Add a new shadow child (a sibling of the first one).
var shadowB = document.createElement('input');
container.shadowRoot.appendChild(shadowB);
// Mutation observer should notice the new child and inert it.
setTimeout(function() {
assert.isTrue(input.inert, 'new shadow child inert');
done();
});
});
});
})();

0 comments on commit 69f9293

Please sign in to comment.