diff options
Diffstat (limited to 'testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm')
-rw-r--r-- | testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm b/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm new file mode 100644 index 0000000000..f1a9310c07 --- /dev/null +++ b/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm @@ -0,0 +1,25 @@ +<!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="resources/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_dom("ConstraintError", function(){ + db.createObjectStore("store", { + keyPath: "key1", + }); + }); + t.done(); +} +</script> + |