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

Unified Diff: chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/test.js

Issue 123733003: Get ride of chrome.storage.* data when removing an application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/test.js
diff --git a/chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/test.js b/chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..5bb833c3556a02f88e8838c4b707039a0a0d9a92
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/test.js
@@ -0,0 +1,31 @@
+// Copyright 2013 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.
+
+function testChromeStorage(backend, callback) {
+ backend.get('foo', chrome.test.callbackPass(function(result) {
+ chrome.test.assertEq(undefined, result.foo,
+ 'no value should have been found');
+ chrome.test.assertEq(undefined, chrome.runtime.lastError);
+
+ // We set the value but also want to make sure it is correctly saved.
+ backend.set({ 'foo': 'bar' }, chrome.test.callbackPass(function() {
+ backend.get('foo', chrome.test.callbackPass(function(result) {
+ chrome.test.assertEq('bar', result.foo, 'value should be written');
+ }));
+ }));
+ }));
+}
+
+chrome.app.runtime.onLaunched.addListener(function() {
+ chrome.test.sendMessage('Launched', function() {
+ chrome.test.runTests([
+ function testChromeStorageLocal() {
+ testChromeStorage(chrome.storage.local);
+ },
+ function testChromeStorageSync() {
+ testChromeStorage(chrome.storage.sync);
+ }
+ ]);
+ });
+});
« no previous file with comments | « chrome/test/data/extensions/platform_apps/reinstall_data_cleanup/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698