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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html

Issue 2415203002: Indexed DB: More exception precedence tests (Closed)
Patch Set: Review feedback - no more tx pinning, tweaked store create/delete tests to satisfy FF Created 4 years, 2 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: third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html b/third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html
new file mode 100644
index 0000000000000000000000000000000000000000..31a9ed92797b79443d305516b8e8d3ae51f35558
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>IndexedDB: IDBTransaction objectStore() Exception Ordering</title>
+<meta charset=utf-8>
+<link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbtransaction-objectstore">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="resources/testharness-helpers.js"></script>
+<script>
+
+indexeddb_test(
+ (t, db) => {
+ const store = db.createObjectStore('s');
+ },
+ (t, db) => {
+ const tx = db.transaction('s');
+ tx.oncomplete = t.step_func(() => {
+ assert_throws('InvalidStateError', () => { tx.objectStore('nope'); },
+ '"finished" check (InvalidStateError) should precede ' +
+ '"name in scope" check (NotFoundError)');
+ t.done();
+ });
+ },
+ 'IDBTransaction.objectStore exception order: InvalidStateError vs. NotFoundError'
+);
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698