OLD | NEW |
1 <!DOCTYPE html> | 1 <!doctype html> |
| 2 <meta charset=utf-8> |
2 <title>IndexedDB: open and delete requests are processed as a FIFO queue</title> | 3 <title>IndexedDB: open and delete requests are processed as a FIFO queue</title> |
3 <script src='../../resources/testharness.js'></script> | 4 <link rel="help" href="https://w3c.github.io/IndexedDB/#request-connection-queue
"> |
4 <script src='../../resources/testharnessreport.js'></script> | 5 <script src="/resources/testharness.js"></script> |
5 <script src='resources/testharness-helpers.js'></script> | 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="support.js"></script> |
6 <script> | 8 <script> |
7 | 9 |
8 async_test(t => { | 10 async_test(t => { |
9 let db_name = 'db' + self.location.pathname + '-' + t.name; | 11 let db_name = 'db' + self.location.pathname + '-' + t.name; |
10 indexedDB.deleteDatabase(db_name); | 12 indexedDB.deleteDatabase(db_name); |
11 | 13 |
12 // Open and hold connection while other requests are queued up. | 14 // Open and hold connection while other requests are queued up. |
13 let r = indexedDB.open(db_name, 1); | 15 let r = indexedDB.open(db_name, 1); |
14 r.onerror = t.unreached_func('open should succeed'); | 16 r.onerror = t.unreached_func('open should succeed'); |
15 r.onsuccess = t.step_func(e => { | 17 r.onsuccess = t.step_func(e => { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 open('open2', 3); | 54 open('open2', 3); |
53 deleteDatabase('delete2'); | 55 deleteDatabase('delete2'); |
54 | 56 |
55 // Now unblock the queue. | 57 // Now unblock the queue. |
56 db.close(); | 58 db.close(); |
57 }); | 59 }); |
58 | 60 |
59 }, 'Opens and deletes are processed in order'); | 61 }, 'Opens and deletes are processed in order'); |
60 | 62 |
61 </script> | 63 </script> |
OLD | NEW |