Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_deleted.htm

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_deleted.htm
diff --git a/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_deleted.htm b/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_deleted.htm
new file mode 100644
index 0000000000000000000000000000000000000000..422ffacc3d01b1ae312ec24e032ae29a9c506d2e
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_deleted.htm
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Attempting to use deleted IDBObjectStore</title>
+<link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#object-store">
+<link rel=assert title="InvalidStateError Occurs if a request is made on a source object that has been deleted or removed.">
+<link rel=author href="mailto:odinho@opera.com" title="Odin Hørthe Omdal">
+<script src=../../../resources/testharness.js></script>
+<script src=../../../resources/testharnessreport.js></script>
+<script src=support.js></script>
+
+<script>
+ var db,
+ add_success = false,
+ t = async_test(document.title, {timeout: 10000})
+
+ var open_rq = createdb(t);
+ open_rq.onupgradeneeded = function(e) {
+ db = e.target.result;
+
+ var objStore = db.createObjectStore("store", { autoIncrement: true });
+ assert_equals(db.objectStoreNames[0], "store", "objectStoreNames");
+
+ var rq_add = objStore.add(1);
+ rq_add.onsuccess = function() { add_success = true; };
+ rq_add.onerror = fail(t, 'rq_add.error');
+
+ objStore.createIndex("idx", "a");
+ db.deleteObjectStore("store");
+ assert_equals(db.objectStoreNames.length, 0, "objectStoreNames.length after delete");
+
+ assert_throws(null, function() { objStore.add(2); });
+ assert_throws(null, function() { objStore.put(3); });
+ assert_throws(null, function() { objStore.get(1); });
+ assert_throws(null, function() { objStore.clear(); });
+ assert_throws(null, function() { objStore.count(); });
+ assert_throws(null, function() { objStore.delete(1); });
+ assert_throws(null, function() { objStore.openCursor(); });
+ assert_throws(null, function() { objStore.index("idx"); });
+ assert_throws(null, function() { objStore.deleteIndex("idx"); });
+ assert_throws(null, function() { objStore.createIndex("idx2", "a"); });
+ }
+
+ open_rq.onsuccess = function() {
+ assert_true(add_success, "First add was successful");
+ t.done();
+ }
+</script>
+
+<div id=log></div>

Powered by Google App Engine
This is Rietveld 408576698