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

Side by Side Diff: content/test/data/indexeddb/quota_test.js

Issue 12035081: IndexedDB: Specify reason when aborting due to quota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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 | « content/browser/in_process_webkit/indexed_db_dispatcher_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 function test() { 5 function test() {
6 if (window.webkitStorageInfo) { 6 if (window.webkitStorageInfo) {
7 window.jsTestIsAsync = true; 7 window.jsTestIsAsync = true;
8 webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, 8 webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY,
9 initUsageCallback, 9 initUsageCallback,
10 unexpectedErrorCallback); 10 unexpectedErrorCallback);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 dataAdded += dataLength; 81 dataAdded += dataLength;
82 debug("We've added "+ displaySize(dataAdded)); 82 debug("We've added "+ displaySize(dataAdded));
83 returnedUsage = usage; 83 returnedUsage = usage;
84 returnedQuota = quota; 84 returnedQuota = quota;
85 debug("Allotted quota is " + displaySize(returnedQuota)); 85 debug("Allotted quota is " + displaySize(returnedQuota));
86 debug("LevelDB usage is " + displaySize(returnedUsage)); 86 debug("LevelDB usage is " + displaySize(returnedUsage));
87 startNewTransaction(); 87 startNewTransaction();
88 } 88 }
89 89
90 function onAbort() { 90 function onAbort() {
91 shouldBeEqualToString("event.target.error.name", "QuotaExceededError");
91 done("Transaction aborted. Data added: " + displaySize(dataAdded)); 92 done("Transaction aborted. Data added: " + displaySize(dataAdded));
92 debug("There were " + successfulWrites + " successful writes"); 93 debug("There were " + successfulWrites + " successful writes");
93 } 94 }
94 95
95 function logError() { 96 function logError() {
96 debug("Error function called: (" + event.target.errorCode + ") " + 97 debug("Error function called: (" + event.target.errorCode + ") " +
97 event.target.webkitErrorMessage); 98 event.target.webkitErrorMessage);
98 event.preventDefault(); 99 event.preventDefault();
99 } 100 }
100 101
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_dispatcher_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698