Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>IDBDatabase.createIndex() - If an index with the name name already exists in this object store, the implementation must throw a DOMException of type ConstraintError </title>
<link rel="author" title="Intel" href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/support.js"></script>
<div id="log"></div>
var t = async_test(),
open_rq = createdb(t);
open_rq.onupgradeneeded = function (e) {
var db =;
var ostore = db.createObjectStore("store");
ostore.createIndex("a", "a");
assert_throws_dom("ConstraintError", function(){
ostore.createIndex("a", "a");