1 <script src=
"../../../resources/js-test.js"></script>
3 window
.jsTestIsAsync
= true;
4 description('Transient registrations should be cleared even without delivery.');
6 var mutationsDelivered
= false;
7 function callback(mutations
) {
8 mutationsDelivered
= true;
10 var observer
= new MutationObserver(callback
);
12 var div
= document
.createElement('div');
13 var span
= div
.appendChild(document
.createElement('span'));
14 observer
.observe(div
, {attributes
: true, subtree
: true});
15 div
.removeChild(span
);
16 setTimeout(function() {
17 // By the time this function runs the transient registration should be cleared,
18 // so we expect not to be notified of this attribute mutation.
19 span
.setAttribute('bar', 'baz');
20 setTimeout(function() {
21 shouldBeFalse('mutationsDelivered');