OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>IDBObjectStore.put() - If the object store has been deleted, the implemen
tation must throw a DOMException of type InvalidStateError</title> |
| 4 <link rel="author" title="Intel" href="http://www.intel.com"> |
| 5 <link rel="help" href="https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.ht
ml#widl-IDBObjectStore-put-IDBRequest-any-value-any-key"> |
| 6 <script src="../../../resources/testharness.js"></script> |
| 7 <script src="../../../resources/testharnessreport.js"></script> |
| 8 <script src="support.js"></script> |
| 9 <div id="log"></div> |
| 10 <script> |
| 11 var db, |
| 12 ostore, |
| 13 t = async_test(); |
| 14 |
| 15 var open_rq = createdb(t); |
| 16 open_rq.onupgradeneeded = function (event) { |
| 17 db = event.target.result; |
| 18 ostore = db.createObjectStore("store", {keyPath:"pKey"}); |
| 19 db.deleteObjectStore("store"); |
| 20 } |
| 21 |
| 22 open_rq.onsuccess = function (event) { |
| 23 t.step(function(){ |
| 24 assert_throws("InvalidStateError", function(){ |
| 25 ostore.put({pKey: "primaryKey_0"}); |
| 26 }); |
| 27 }); |
| 28 t.done(); |
| 29 } |
| 30 </script> |
| 31 |
OLD | NEW |