Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / MutationObserver / database-callback-delivery.html
blobc118907f72153d8fe2e123731110dd85fa130665
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 window.jsTestIsAsync = true;
5 var mutations;
7 function testDatabase() {
8 var div;
9 var db;
10 var observer;
12 function start() {
13 mutations = null;
14 div = document.createElement('div');
15 observer = new MutationObserver(function(m) {
16 mutations = m;
17 });
19 observer.observe(div, { attributes: true, characterData: true });
21 db = openDatabase('DatabaseMutationDelivery', '1.0', '', 1);
22 db.transaction(mutate);
25 function mutate() {
26 div.setAttribute('foo', 'bar');
27 setTimeout(finish, 0);
30 function finish() {
31 shouldBe('mutations.length', '1');
32 shouldBe('mutations[0].type', '"attributes"');
33 shouldBe('mutations[0].attributeName', '"foo"');
34 observer.disconnect();
35 debug('');
36 finishJSTest();
39 start();
42 description('Testing mutations are delivered following Database transaction callbacks.');
44 testDatabase();
45 </script>