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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbobjectstore-rename-store.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 <meta name="timeout" content="long"> 3 <meta name="timeout" content="long">
3 <title>IndexedDB: object store renaming support</title> 4 <title>IndexedDB: object store renaming support</title>
4 <link rel="help" 5 <link rel="help"
5 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-name"> 6 href="https://w3c.github.io/IndexedDB/#dom-idbobjectstore-name">
6 <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> 7 <link rel="author" href="pwnall@chromium.org" title="Victor Costan">
7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script> 9 <script src="/resources/testharnessreport.js"></script>
9 <script src="support-promises.js"></script> 10 <script src="support-promises.js"></script>
10 <script> 11 <script>
12 'use strict';
11 13
12 // Renames the 'books' store to 'renamed_books'. 14 // Renames the 'books' store to 'renamed_books'.
13 // 15 //
14 // Returns a promise that resolves to an IndexedDB database. The caller must 16 // Returns a promise that resolves to an IndexedDB database. The caller must
15 // close the database. 17 // close the database.
16 const renameBooksStore = (testCase) => { 18 const renameBooksStore = (testCase) => {
17 return migrateDatabase(testCase, 2, (database, transaction) => { 19 return migrateDatabase(testCase, 2, (database, transaction) => {
18 const store = transaction.objectStore('books'); 20 const store = transaction.objectStore('books');
19 store.name = 'renamed_books'; 21 store.name = 'renamed_books';
20 }); 22 });
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 const store = transaction.objectStore(name); 360 const store = transaction.objectStore(name);
359 return checkStoreContents( 361 return checkStoreContents(
360 testCase, store, 362 testCase, store,
361 'Renaming an object store should not change its records').then( 363 'Renaming an object store should not change its records').then(
362 () => database.close()); 364 () => database.close());
363 }); 365 });
364 }, 'IndexedDB object store can be renamed to "' + escapedName + '"'); 366 }, 'IndexedDB object store can be renamed to "' + escapedName + '"');
365 })(escapedName); 367 })(escapedName);
366 368
367 </script> 369 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698