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

Side by Side Diff: tools/perf/page_sets/endure/indexeddb_app_worker.js

Issue 401893002: IndexedDB: Stop using webkit-prefixed versions of APIs in tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More webkitIndexedDB foo and update webkitErrorMessage use too Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « tools/perf/page_sets/endure/indexeddb_app.js ('k') | ui/file_manager/image_loader/cache.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file simulates a typical background process of an offline-capable 5 // This file simulates a typical background process of an offline-capable
6 // authoring application. When in an "online" state it receives chunks of 6 // authoring application. When in an "online" state it receives chunks of
7 // data updates from a simulated server and stores them in a temporary IDB 7 // data updates from a simulated server and stores them in a temporary IDB
8 // data store. On a different timer, the chunks are drained from the 8 // data store. On a different timer, the chunks are drained from the
9 // temporary store and combined into larger records in a permanent store. 9 // temporary store and combined into larger records in a permanent store.
10 // When in an "offline" state, nothing else happens. 10 // When in an "offline" state, nothing else happens.
11 11
12 self.indexedDB = self.indexedDB || self.webkitIndexedDB ||
13 self.mozIndexedDB;
14 self.IDBKeyRange = self.IDBKeyRange || self.webkitIDBKeyRange;
15
16 function unexpectedErrorCallback(e) { 12 function unexpectedErrorCallback(e) {
17 self.postMessage({type: 'ERROR', error: { name: e.target.error.name }, 13 self.postMessage({type: 'ERROR', error: {
18 webkitErrorMessage: e.target.webkitErrorMessage}); 14 name: e.target.error.name,
15 message: e.target.error.message
16 }});
19 } 17 }
20 18
21 function unexpectedAbortCallback(e) { 19 function unexpectedAbortCallback(e) {
22 self.postMessage({type: 'ABORT', error: { name: e.target.error.name }, 20 self.postMessage({type: 'ABORT', error: {
23 webkitErrorMessage: e.target.webkitErrorMessage}); 21 name: e.target.error.name,
22 message: e.target.error.message
23 }});
24 } 24 }
25 25
26 function log(message) { 26 function log(message) {
27 self.postMessage({type: 'LOG', message: message}); 27 self.postMessage({type: 'LOG', message: message});
28 } 28 }
29 29
30 function error(message) { 30 function error(message) {
31 self.postMessage({type: 'ERROR', message: message}); 31 self.postMessage({type: 'ERROR', message: message});
32 } 32 }
33 33
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 }; 215 };
216 transaction.onabort = unexpectedAbortCallback; 216 transaction.onabort = unexpectedAbortCallback;
217 transaction.oncomplete = function () { 217 transaction.oncomplete = function () {
218 log('combine ' + combine_id + 218 log('combine ' + combine_id +
219 ' finished, processed ' + combine_chunk_count + ' chunks'); 219 ' finished, processed ' + combine_chunk_count + ' chunks');
220 db.close(); 220 db.close();
221 combineTimeoutId = setTimeout(combine, COMBINE_TIMEOUT); 221 combineTimeoutId = setTimeout(combine, COMBINE_TIMEOUT);
222 }; 222 };
223 }; 223 };
224 } 224 }
OLDNEW
« no previous file with comments | « tools/perf/page_sets/endure/indexeddb_app.js ('k') | ui/file_manager/image_loader/cache.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698