d0006bfe1fa6a7a8297d3c5bd45d4b5686f4d4a1
[gecko.git] / idbdatabase_createObjectStore3.htm
blobd0006bfe1fa6a7a8297d3c5bd45d4b5686f4d4a1
1 <!DOCTYPE html>
2 <title>IDBDatabase.createObjectStore() - attempt to create an object store outside of a version change transaction </title>
3 <link rel="author" title="Microsoft" href="http://www.microsoft.com">
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="resources/support.js"></script>
8 <script>
10 var t = async_test(),
11 open_rq = createdb(t)
13 open_rq.onupgradeneeded = function() {}
14 open_rq.onsuccess = function (e) {
15 var db = e.target.result
16 assert_throws_dom(
17 'InvalidStateError',
18 function() { db.createObjectStore('fails') })
19 t.done();
22 </script>
24 <div id="log"></div>