Have window.indexedDB.open return an IDBOpenDBRequest.
[WebKit-https.git] / LayoutTests / storage / indexeddb / modern / opendatabase-request.html
1 This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
2 <script>
3
4 if (window.testRunner) {
5     testRunner.waitUntilDone();
6     testRunner.dumpAsText();
7 }
8
9 function done()
10 {
11     alert("Done");
12     if (window.testRunner)
13         testRunner.notifyDone();
14 }
15
16 var request = window.indexedDB.open("TestDatabase");
17 alert(request);
18
19 request = window.indexedDB.open("");
20 alert(request);
21
22 try {
23         var request = window.indexedDB.open();
24 } catch (e) {
25         alert(e);
26 }
27
28 try {
29         var request = window.indexedDB.open("name", 0);
30 } catch (e) {
31         alert(e);
32 }
33
34 done();
35 </script>