blob: 7536cd339c2291e6d9e7427eafd1c9e591c7170a [file] [log] [blame]
<!DOCTYPE html>
<body>
<input>
<script src="../../js/resources/js-test-pre.js"></script>
<script>
description('Test that mutation events are not triggered in shadow DOM');
var mutationEventTriggered = false;
function doTest() {
var input = document.querySelector('input');
var shadowRoot = internals.shadowRoot(input);
var firstChild = shadowRoot.firstChild;
firstChild.addEventListener('DOMNodeInserted', function(evt) {
mutationEventTriggered = true;
});
input.value = 'hello';
shouldBeFalse('mutationEventTriggered');
}
if (window.internals)
doTest();
else
testFailed('This test only runs in DRT');
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>