| OLD | NEW |
| 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 Loading... |
| 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 ]); |
| OLD | NEW |