blob: 007e42b823dbb6a590afb8247e9d90caaf98daa0 [file] [log] [blame]
// original test:
// http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_key_requirements.html
// license of original test:
// " Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/ "
if (this.importScripts) {
importScripts('../../../../resources/js-test.js');
importScripts('../../resources/shared.js');
}
description("Test IndexedDB's behavior adding inline and passed key simultaneously");
indexedDBTest(prepareDatabase);
function prepareDatabase()
{
db = event.target.result;
event.target.transaction.onabort = unexpectedAbortCallback;
objectStore = evalAndLog("objectStore = db.createObjectStore('baz', { keyPath: 'id' });");
evalAndExpectException("objectStore.add({id: 5}, 5);", "0", "'DataError'");
finishJSTest();
}