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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html

Issue 1897253003: IndexedDB: Align exception priorities with Firefox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback: more cases, split files, better messages Created 4 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: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html b/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
new file mode 100644
index 0000000000000000000000000000000000000000..2c9236640a5f1cce7263a2fde3f2eb4395f0abc4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<title>IndexedDB: IDBDatabase createObjectStore() Exception Ordering</title>
+<link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-createobjectstore">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="resources/testharness-helpers.js"></script>
+
+<script>
+
+indexeddb_test(
+ function(t, db) {
+ db.createObjectStore('s');
+ assert_throws('SyntaxError', function() {
+ db.createObjectStore('s', {keyPath: 'not a valid key path'});
+ }, '"Invalid keyath" check (SyntaxError) should precede ' +
+ '"duplicate store name" check (ConstraintError)');
+ t.done();
+ },
+ function(t, db) {},
+ 'IDBDatabase.createObjectStore exception order: ConstraintError vs. SyntaxError'
+);
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698