tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / storage / indexeddb / create-and-remove-object-store.html
index 43c1fe1..32bae1d 100755 (executable)
@@ -1,8 +1,6 @@
 <html>
 <head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
 <script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
 <script src="resources/shared.js"></script>
 </head>
 <body>
@@ -37,7 +35,7 @@ function testCreateAndRemove()
     debug("Trying create");
     evalAndExpectException('db.createObjectStore("some os")', "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
     debug("Trying remove");
-    evalAndExpectException('db.createObjectStore("some os")', "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    evalAndExpectException('db.deleteObjectStore("some os")', "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
 }
 
 function cleanDatabase()
@@ -47,7 +45,7 @@ function cleanDatabase()
     os = evalAndLog("db.createObjectStore('tmp')");
     evalAndExpectException("db.createObjectStore('tmp')", "webkitIDBDatabaseException.CONSTRAINT_ERR");
 
-    trans = evalAndLog("trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})");
+    trans = evalAndLog("trans = db.transaction(['tmp'])");
     request = evalAndLog("trans.objectStore('tmp').get(0)");
     request.onsuccess = tryOnceMore;
     request.onerror = unexpectedErrorCallback;
@@ -59,10 +57,14 @@ function tryOnceMore()
 
     testCreateAndRemove();
 
+    debug("Trying create with store that already exists");
+    evalAndExpectException("db.createObjectStore('tmp')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    debug("Trying remove with store that already exists");
+    evalAndExpectException("db.deleteObjectStore('tmp')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+
     done();
 }
 
-var successfullyParsed = true;
 
 test();