<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBObjectStore.deleteIndex() - removes the 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(),
      key = 1,
      record = { property: "data" };

    var open_rq = createdb(t);
    open_rq.onupgradeneeded = function(e) {
        db = e.target.result;
        db.createObjectStore("test")
          .createIndex("index", "indexedProperty")
    };

    open_rq.onsuccess = function(e) {
        db.close();
        var new_version = createdb(t, db.name, 2);
        new_version.onupgradeneeded = function(e) {
            db = e.target.result;
            var objStore = e.target.transaction.objectStore("test")
            objStore.deleteIndex("index");
        }
        new_version.onsuccess = function(e) {
            var index,
              objStore = db.transaction("test")
                           .objectStore("test");

            assert_throws_dom('NotFoundError',
                function() { index = objStore.index("index") });
            assert_equals(index, undefined);
            t.done();
        }
    }
</script>

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