2 <script src=
"../../../resources/js-test.js"></script>
4 window
.jsTestIsAsync
= true;
7 function testDatabase() {
14 div
= document
.createElement('div');
15 observer
= new MutationObserver(function(m
) {
19 observer
.observe(div
, { attributes
: true, characterData
: true });
21 db
= openDatabase('DatabaseMutationDelivery', '1.0', '', 1);
22 db
.transaction(mutate
);
26 div
.setAttribute('foo', 'bar');
27 setTimeout(finish
, 0);
31 shouldBe('mutations.length', '1');
32 shouldBe('mutations[0].type', '"attributes"');
33 shouldBe('mutations[0].attributeName', '"foo"');
34 observer
.disconnect();
42 description('Testing mutations are delivered following Database transaction callbacks.');