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

Unified Diff: chrome/test/data/extensions/api_test/request_quota_background/background.js

Issue 10948002: Make quota requests from background pages not crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/request_quota_background/background.js
diff --git a/chrome/test/data/extensions/api_test/request_quota_background/background.js b/chrome/test/data/extensions/api_test/request_quota_background/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..2f14925f736355d3738bbd0c462ff54b9a127688
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/request_quota_background/background.js
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+webkitStorageInfo.requestQuota(PERSISTENT, 1, pass, fail);
+
+function pass() {
+ console.log("PASS");
+ if (window.chrome && chrome.test && chrome.test.succeed)
+ chrome.test.succeed();
+}
+
+function fail() {
+ console.log("FAIL");
+ if (window.chrome && chrome.test && chrome.test.fail)
+ chrome.test.fail();
+}

Powered by Google App Engine
This is Rietveld 408576698