https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 910cbe6357ce4edfe2b10c74dbd3920b26e6144d authored by Mike West on 23 February 2015, 10:47:11 UTC
Contributing Blink's Content Security Policy layout tests.
Tip revision: 910cbe6
idbobjectstore_put12.htm
<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBObjectStore.put() - Attempt to put a record where the record's in-line key is not defined </title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com">
<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", { keyPath: "key" });

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

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

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