Revision 8c082b2469660135ce3347f01fb972f46932930c authored by Michael[tm] Smith on 06 March 2018, 06:25:24 UTC, committed by Michael[tm] Smith on 06 March 2018, 06:52:33 UTC
1 parent c031760
idbdatabase_createObjectStore11.htm
<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBDatabase.createObjectStore() - attempting to create an existing object store with a different keyPath throw ConstraintError </title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-IDBObjectStoreParameters-optionalParameters">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support.js"></script>
<div id="log"></div>
<script>
var t = async_test(),
open_rq = createdb(t);
open_rq.onupgradeneeded = function (e) {
var db = e.target.result;
db.createObjectStore("store");
assert_throws("ConstraintError", function(){
db.createObjectStore("store", {
keyPath: "key1",
});
});
t.done();
}
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...