https://github.com/web-platform-tests/wpt
Raw File
Tip revision: feeda08fb7c8a7c57afb1448d118942236ef6c94 authored by Coroiu Cristina on 26 November 2018, 20:19:20 UTC
Backed out changeset d32110a492f5 (bug 1383454) for did not disable the test
Tip revision: feeda08
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>
<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");

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

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

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