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

Side by Side Diff: chrome/test/data/extensions/api_test/settings/simple_test/background.js

Issue 10871034: Make all quota-exceeding messages in the storage API explain what the failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update... the other error message Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/bookmarks/test.js ('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(stage0) { 5 function test(stage0) {
6 var apis = [ 6 var apis = [
7 chrome.storage.sync, 7 chrome.storage.sync,
8 chrome.storage.local 8 chrome.storage.local
9 ]; 9 ];
10 apis.forEach(function(api) { 10 apis.forEach(function(api) {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } else { 349 } else {
350 area.clear(function() { 350 area.clear(function() {
351 clearNTimes(area, n - 1, whenDone); 351 clearNTimes(area, n - 1, whenDone);
352 }); 352 });
353 } 353 }
354 } 354 }
355 355
356 var local = chrome.storage.local; 356 var local = chrome.storage.local;
357 var sync = chrome.storage.sync; 357 var sync = chrome.storage.sync;
358 var test = chrome.test; 358 var test = chrome.test;
359 var quotaError = "This request exceeds available quota."; 359 var quotaError =
360 "This request exceeds the MAX_WRITE_OPERATIONS_PER_HOUR quota.";
360 361
361 clearNTimes(local, 1001, test.callbackPass(function() { 362 clearNTimes(local, 1001, test.callbackPass(function() {
362 clearNTimes(sync, 1001, test.callbackFail(quotaError, function() { 363 clearNTimes(sync, 1001, test.callbackFail(quotaError, function() {
363 clearNTimes(local, 1, test.callbackPass(function() { 364 clearNTimes(local, 1, test.callbackPass(function() {
364 clearNTimes(sync, 1, test.callbackFail(quotaError, test.succeed)); 365 clearNTimes(sync, 1, test.callbackFail(quotaError, test.succeed));
365 })); 366 }));
366 })); 367 }));
367 })); 368 }));
368 } 369 }
369 ]); 370 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/bookmarks/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698