https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 9a2e7a8ddcd0c2bb7475d31c92a5d61705ca1f2f authored by Andrea Marchesini on 04 April 2018, 17:49:15 UTC
Update the StructuredCloneAlgorithm to follow the latest version of the spec,
Tip revision: 9a2e7a8
idbdatabase_transaction3.htm
<!DOCTYPE html>
<title>IDBDatabase.transaction() - attempt to open a transaction from closed database connection </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(),
      open_rq = createdb(t);

    open_rq.onupgradeneeded = function(e) {
        db = e.target.result;
        db.createObjectStore('test');
    };

    open_rq.onsuccess = function(e) {
        db.close();

        assert_throws('InvalidStateError',
            function() { db.transaction('test'); });

        t.done();
    };
</script>

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