OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
3 <script> | 3 <script> |
4 window.jsTestIsAsync = true; | 4 window.jsTestIsAsync = true; |
5 var mutations; | 5 var mutations; |
6 | 6 |
7 function testDatabase() { | 7 function testDatabase() { |
8 var div; | 8 var div; |
9 var db; | 9 var db; |
10 var observer; | 10 var observer; |
11 | 11 |
12 function start() { | 12 function start() { |
13 mutations = null; | 13 mutations = null; |
14 div = document.createElement('div'); | 14 div = document.createElement('div'); |
15 observer = new WebKitMutationObserver(function(m) { | 15 observer = new MutationObserver(function(m) { |
16 mutations = m; | 16 mutations = m; |
17 }); | 17 }); |
18 | 18 |
19 observer.observe(div, { attributes: true, characterData: true }); | 19 observer.observe(div, { attributes: true, characterData: true }); |
20 | 20 |
21 db = openDatabase('DatabaseMutationDelivery', '1.0', '', 1); | 21 db = openDatabase('DatabaseMutationDelivery', '1.0', '', 1); |
22 db.transaction(mutate); | 22 db.transaction(mutate); |
23 } | 23 } |
24 | 24 |
25 function mutate() { | 25 function mutate() { |
(...skipping 11 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 start(); | 39 start(); |
40 } | 40 } |
41 | 41 |
42 description('Testing mutations are delivered following Database transaction call
backs.'); | 42 description('Testing mutations are delivered following Database transaction call
backs.'); |
43 | 43 |
44 testDatabase(); | 44 testDatabase(); |
45 </script> | 45 </script> |
46 <script src="../../js/resources/js-test-post.js"></script> | 46 <script src="../../js/resources/js-test-post.js"></script> |
OLD | NEW |