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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbobjectstore-rename-errors.html

Issue 2614953003: Import wpt@eeecf3e14368d4ab5221cde688003dedeca30dba (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!doctype html>
2 <meta charset="utf8">
2 <title>IndexedDB: object store renaming error handling</title> 3 <title>IndexedDB: object store renaming error handling</title>
3 <link rel="help" 4 <link rel="help"
4 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-name"> 5 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-name">
5 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> 6 <link rel="author" href="pwnall@chromium.org" title="Victor Costan">
6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testharnessreport.js"></script>
8 <script src="support-promises.js"></script> 9 <script src="support-promises.js"></script>
9 <script> 10 <script>
11 'use strict';
10 12
11 promise_test(testCase => { 13 promise_test(testCase => {
12 return createDatabase(testCase, (database, transaction) => { 14 return createDatabase(testCase, (database, transaction) => {
13 createBooksStore(testCase, database); 15 createBooksStore(testCase, database);
14 }).then(database => { 16 }).then(database => {
15 database.close(); 17 database.close();
16 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => { 18 }).then(() => migrateDatabase(testCase, 2, (database, transaction) => {
17 const store = transaction.objectStore('books'); 19 const store = transaction.objectStore('books');
18 database.deleteObjectStore('books'); 20 database.deleteObjectStore('books');
19 assert_throws('InvalidStateError', () => store.name = 'renamed_books'); 21 assert_throws('InvalidStateError', () => store.name = 'renamed_books');
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const transaction = database.transaction('books', 'readonly'); 111 const transaction = database.transaction('books', 'readonly');
110 const store = transaction.objectStore('books'); 112 const store = transaction.objectStore('books');
111 return checkStoreContents( 113 return checkStoreContents(
112 testCase, store, 114 testCase, store,
113 'Committing a transaction with a failed rename attempt should ' + 115 'Committing a transaction with a failed rename attempt should ' +
114 "not change the store's contents").then(() => database.close()); 116 "not change the store's contents").then(() => database.close());
115 }); 117 });
116 }, 'IndexedDB object store rename handles exceptions when stringifying names'); 118 }, 'IndexedDB object store rename handles exceptions when stringifying names');
117 119
118 </script> 120 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698