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

Unified Diff: chrome/browser/resources/ntp_search/mock/mock.js

Issue 11412214: NTP5: Fine tuning of Apps implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace rgba(0,0,0,0) with transparent Created 8 years 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/browser/resources/ntp_search/mock/debug.css ('k') | chrome/browser/resources/ntp_search/new_tab.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp_search/mock/mock.js
diff --git a/chrome/browser/resources/ntp_search/mock/mock.js b/chrome/browser/resources/ntp_search/mock/mock.js
index 7b6485d6ef921bfbb7416f4fafa06af317323a2b..11e9beb52f0e622b6a8f22ba745410a2256b6386 100644
--- a/chrome/browser/resources/ntp_search/mock/mock.js
+++ b/chrome/browser/resources/ntp_search/mock/mock.js
@@ -17,6 +17,7 @@ var recordMockData = false;
// Only messages registered in the callback map will be intercepted.
var callbackMap = {
+ 'appRemoved': 'ntp.appRemoved',
'blacklistURLFromMostVisited': NO_CALLBACK,
'clearMostVisitedURLsBlacklist': NO_CALLBACK,
'getApps': 'ntp.getAppsCallback',
@@ -242,14 +243,18 @@ var recordMockData = false;
},
uninstallApp: function(id) {
+ var appData;
var data = dataMap['getApps'][0].apps;
for (var i = 0, length = data.length; i < length; i++) {
if (data[i].id == id) {
+ appData = data[i];
data.splice(i, 1);
break;
}
}
- dispatchCallbackForMessage('getApps');
+ assert(appData);
+ dataMap['appRemoved'] = [appData, true, true];
+ dispatchCallbackForMessage('appRemoved');
},
};
« no previous file with comments | « chrome/browser/resources/ntp_search/mock/debug.css ('k') | chrome/browser/resources/ntp_search/new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698