https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 5875b656b247b830dd700811ef722c9a9dde35d9 authored by Michael[tm] Smith on 12 April 2014, 13:35:53 UTC
cc Added URL tests.
Tip revision: 5875b65
idbobjectstore_put13.htm
<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBObjectStore.put() - Attempt to put a record where the out of line key provided does not meet the constraints of a valid key </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support.js"></script>

<script>
    var db,
      t = async_test(),
      record = { property: "data" };

    var open_rq = createdb(t);
    open_rq.onupgradeneeded = function(e) {
        db = e.target.result;

        var rq,
          objStore = db.createObjectStore("store");

        assert_throws("DataError",
            function() { rq = objStore.put(record, { value: 1 }); });

        assert_equals(rq, undefined);
        t.done();
    };
</script>

<div id="log"></div>
back to top