3 <title>IDBObjectStore.add() - Attempt to add a record that does not meet the constraints of an object store's inline key requirements </title>
4 <link rel="author" title="Microsoft" href="http://www.microsoft.com">
5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script>
7 <script src="support.js"></script>
11 record = { key: 1, property: "data" };
13 var open_rq = createdb(t);
14 open_rq.onupgradeneeded = function(e) {
17 objStore = db.createObjectStore("store", { keyPath: "key" });
19 assert_throws("DataError",
20 function() { rq = objStore.add(record, 1); });
22 assert_equals(rq, undefined);