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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 function testChromeStorage(backend, callback) {
6 backend.get('foo', chrome.test.callbackPass(function(result) {
7 chrome.test.assertEq(undefined, result.foo,
8 'no value should have been found');
9 chrome.test.assertEq(undefined, chrome.runtime.lastError);
10
11 // We set the value but also want to make sure it is correctly saved.
12 backend.set({ 'foo': 'bar' }, chrome.test.callbackPass(function() {
13 backend.get('foo', chrome.test.callbackPass(function(result) {
14 chrome.test.assertEq('bar', result.foo, 'value should be written');
15 }));
16 }));
17 }));
18 }
19
20 chrome.app.runtime.onLaunched.addListener(function() {
21 chrome.test.sendMessage('Launched', function() {
22 chrome.test.runTests([
23 function testChromeStorageLocal() {
24 testChromeStorage(chrome.storage.local);
25 },
26 function testChromeStorageSync() {
27 testChromeStorage(chrome.storage.sync);
28 }
29 ]);
30 });
31 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698