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

Unified Diff: chrome/browser/resources/google_now/background_unittest.gtestjs

Issue 27030012: Restoring notifications on startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More rgustafson's comments Created 7 years, 2 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/browser/resources/google_now/background.js ('k') | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background_unittest.gtestjs
diff --git a/chrome/browser/resources/google_now/background_unittest.gtestjs b/chrome/browser/resources/google_now/background_unittest.gtestjs
index 8e330dfc68ad6e97d4177d59108f5d1396e99e34..7137848b93f2f2b862805342f8a8097e35f6e764 100644
--- a/chrome/browser/resources/google_now/background_unittest.gtestjs
+++ b/chrome/browser/resources/google_now/background_unittest.gtestjs
@@ -407,13 +407,6 @@ function expectStateMachineCalls(
* expects() calls cannot be chained with the same argument matchers.
*/
function expectInitialization(mockApisObj) {
- mockApisObj.expects(once()).
- chrome_location_clearWatch(ANYTHING);
- mockApisObj.expects(once()).
- updateCardsAttempts_stop();
- mockApisObj.expects(once()).
- chrome_storage_local_remove(
- eqJSON(['notificationsData', 'notificationGroups']));
var tasksAddSavedArgs = new SaveMockArguments();
mockApisObj.expects(once()).
tasks_add(
@@ -462,12 +455,10 @@ TEST_F(
testExperimentVariationParams);
var chromeNotificationGetAllSavedArgs = new SaveMockArguments();
- this.mockApis.expects(exactly(2)).
+ this.mockApis.expects(exactly(1)).
instrumented_notifications_getAll(
chromeNotificationGetAllSavedArgs.match(ANYTHING)).
- will(
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}),
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
+ will(invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
// TODO(robliao,vadimt): Determine the granularity of testing to perform.
@@ -508,12 +499,10 @@ TEST_F(
testExperimentVariationParams);
var chromeNotificationGetAllSavedArgs = new SaveMockArguments();
- this.mockApis.expects(exactly(2)).
+ this.mockApis.expects(exactly(1)).
instrumented_notifications_getAll(
chromeNotificationGetAllSavedArgs.match(ANYTHING)).
- will(
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}),
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
+ will(invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
// Invoking the tested function.
initialize();
@@ -588,12 +577,10 @@ TEST_F('GoogleNowBackgroundUnitTest', 'Initialize_RunGoogleNow', function() {
testExperimentVariationParams);
var chromeNotificationGetAllSavedArgs = new SaveMockArguments();
- this.mockApis.expects(exactly(2)).
+ this.mockApis.expects(exactly(1)).
instrumented_notifications_getAll(
chromeNotificationGetAllSavedArgs.match(ANYTHING)).
- will(
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}),
- invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
+ will(invokeCallback(chromeNotificationGetAllSavedArgs, 0, {}));
this.mockGlobals.expects(once()).startPollingCards();
« no previous file with comments | « chrome/browser/resources/google_now/background.js ('k') | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698