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

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

Issue 9274004: Take the Extension Storage API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 var api = chrome.experimental.storage; 5 var api = chrome.storage;
6 var assertEq = chrome.test.assertEq; 6 var assertEq = chrome.test.assertEq;
7 var inIncognitoContext = chrome.extension.inIncognitoContext; 7 var inIncognitoContext = chrome.extension.inIncognitoContext;
8 8
9 ['sync', 'local'].forEach(function(namespace) { 9 ['sync', 'local'].forEach(function(namespace) {
10 api[namespace].notifications = {}; 10 api[namespace].notifications = {};
11 api.onChanged.addListener(function(changes, event_namespace) { 11 api.onChanged.addListener(function(changes, event_namespace) {
12 if (event_namespace == namespace) { 12 if (event_namespace == namespace) {
13 var notifications = api[namespace].notifications; 13 var notifications = api[namespace].notifications;
14 Object.keys(changes).forEach(function(key) { 14 Object.keys(changes).forEach(function(key) {
15 notifications[key] = changes[key]; 15 notifications[key] = changes[key];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return; 79 return;
80 } 80 }
81 action.bind(api[message.namespace])( 81 action.bind(api[message.namespace])(
82 message.isFinalAction ? chrome.test.succeed : next); 82 message.isFinalAction ? chrome.test.succeed : next);
83 }); 83 });
84 } 84 }
85 next(); 85 next();
86 } 86 }
87 87
88 chrome.test.runTests([testEverything]); 88 chrome.test.runTests([testEverything]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698