blob: cf2c35435cf513c3a329411bc9b0c44b8e3944e2 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBObjectStore.put() - If the transaction this IDBObjectStore belongs to has its mode set to readonly, throw ReadOnlyError</title>
<link rel="author" title="Intel" href="">
<link rel="help" href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support.js"></script>
<div id="log"></div>
var db,
t = async_test();
var open_rq = createdb(t);
open_rq.onupgradeneeded = function (event) {
db =;
db.createObjectStore("store", {keyPath:"pKey"});
open_rq.onsuccess = function (event) {
var txn = db.transaction("store");
var ostore = txn.objectStore("store");
assert_throws("ReadOnlyError", function(){
ostore.put({pKey: "primaryKey_0"});