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

Unified Diff: sync/internal_api/syncapi_unittest.cc

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix deps, win compile error Created 8 years, 6 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
Index: sync/internal_api/syncapi_unittest.cc
diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc
index 1f1079c685d84755f0ae200b13cba73fa1ba77d4..460ee92efb1fa42bb2bc2ad8a36da50866168253 100644
--- a/sync/internal_api/syncapi_unittest.cc
+++ b/sync/internal_api/syncapi_unittest.cc
@@ -1275,16 +1275,19 @@ TEST_F(SyncManagerTest, OnNotificationStateChange) {
HandleJsEvent("onNotificationStateChange",
HasDetailsAsDictionary(false_details)));
- sync_manager_.TriggerOnNotificationStateChangeForTest(true);
- sync_manager_.TriggerOnNotificationStateChangeForTest(false);
+ sync_manager_.SimulateEnableNotificationsForTest();
+ sync_manager_.SimulateDisableNotificationsForTest(
+ sync_notifier::TRANSIENT_NOTIFICATION_ERROR);
SetJsEventHandler(event_handler.AsWeakHandle());
- sync_manager_.TriggerOnNotificationStateChangeForTest(true);
- sync_manager_.TriggerOnNotificationStateChangeForTest(false);
+ sync_manager_.SimulateEnableNotificationsForTest();
+ sync_manager_.SimulateDisableNotificationsForTest(
+ sync_notifier::TRANSIENT_NOTIFICATION_ERROR);
SetJsEventHandler(WeakHandle<JsEventHandler>());
- sync_manager_.TriggerOnNotificationStateChangeForTest(true);
- sync_manager_.TriggerOnNotificationStateChangeForTest(false);
+ sync_manager_.SimulateEnableNotificationsForTest();
+ sync_manager_.SimulateDisableNotificationsForTest(
+ sync_notifier::TRANSIENT_NOTIFICATION_ERROR);
// Should trigger the replies.
PumpLoop();

Powered by Google App Engine
This is Rietveld 408576698