https://github.com/web-platform-tests/wpt
Raw File
Tip revision: c1dbf959c9037926e712df3222e2879f5d763ab3 authored by Mike Pennisi on 13 February 2017, 17:52:13 UTC
fixup! [webdriver] Update tests
Tip revision: c1dbf95
idbobjectstore_index.htm
<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBObjectStore.index() - returns an index </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();

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

        db.createObjectStore("store")
          .createIndex("index", "indexedProperty");
    };

    open_rq.onsuccess = function(e) {
        var index = db.transaction("store")
                      .objectStore("store")
                      .index("index");

        assert_true(index instanceof IDBIndex, 'instanceof IDBIndex');
        t.done();
    };

</script>


<div id="log"></div>

back to top