| OLD | NEW |
| 1 if (this.importScripts) { | 1 if (this.importScripts) { |
| 2 importScripts('../../../resources/testharness.js'); | 2 importScripts('../../../resources/testharness.js'); |
| 3 } | 3 } |
| 4 | 4 |
| 5 function callback(){}; | 5 function callback(){}; |
| 6 | 6 |
| 7 async_test(function(t) { | 7 async_test(function(t) { |
| 8 var description = 'observers constructor test'; | 8 var description = 'observers constructor test'; |
| 9 var dbname = location.pathname + ' - ' + description; | 9 var dbname = location.pathname + ' - ' + description; |
| 10 var openRequest = indexedDB.open(dbname); | 10 var openRequest = indexedDB.open(dbname); |
| 11 var obs1 = new IDBObserver(callback, {transaction: true, values: true}); | 11 var obs1 = new IDBObserver(callback, {transaction: true, values: true}); |
| 12 var obs2 = new IDBObserver(callback, {transaction: true, values: true}); |
| 13 |
| 12 openRequest.onupgradeneeded = t.step_func(function() { | 14 openRequest.onupgradeneeded = t.step_func(function() { |
| 13 var db = openRequest.result; | 15 var db = openRequest.result; |
| 14 db.createObjectStore('store'); | 16 db.createObjectStore('store'); |
| 15 }); | 17 }); |
| 16 openRequest.onsuccess = t.step_func(function() { | 18 openRequest.onsuccess = t.step_func(function() { |
| 17 var db = openRequest.result; | 19 var db = openRequest.result; |
| 18 var tx = db.transaction('store', 'readwrite'); | 20 var tx = db.transaction('store', 'readwrite'); |
| 19 obs1.observe(db, tx); | 21 obs1.observe(db, tx); |
| 22 obs1.observe(db, tx); |
| 23 obs2.observe(db, tx); |
| 24 |
| 20 t.done(); | 25 t.done(); |
| 21 }); | 26 }); |
| 22 | 27 |
| 23 }, 'observers constructor test'); | 28 }, 'observers constructor test'); |
| 24 | 29 |
| 25 done(); | 30 done(); |
| 26 | 31 |
| OLD | NEW |