Index: components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc |
diff --git a/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc b/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc |
index b10c7d56f093f308f89710855367f5c2d4df8d4b..6b28496bc8e842be15af236dff9e72a50860509a 100644 |
--- a/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc |
+++ b/components/ntp_snippets/sessions/tab_delegate_sync_adapter_unittest.cc |
@@ -85,28 +85,28 @@ class TabDelegateSyncAdapterTest : public Test { |
// having open tabs. |
TEST_F(TabDelegateSyncAdapterTest, CallbackCount) { |
ASSERT_EQ(0, CallbackCount()); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(0, CallbackCount()); |
SetHasOpenTabs(true); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(1, CallbackCount()); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(1, CallbackCount()); |
SetHasOpenTabs(false); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(2, CallbackCount()); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(2, CallbackCount()); |
// OnSyncCycleCompleted should behave like OnStateChanged. |
- observer()->OnSyncCycleCompleted(); |
+ observer()->OnSyncCycleCompleted(&service_); |
EXPECT_EQ(2, CallbackCount()); |
SetHasOpenTabs(true); |
- observer()->OnSyncCycleCompleted(); |
+ observer()->OnSyncCycleCompleted(&service_); |
EXPECT_EQ(3, CallbackCount()); |
- observer()->OnSyncCycleCompleted(); |
+ observer()->OnSyncCycleCompleted(&service_); |
EXPECT_EQ(3, CallbackCount()); |
} |
@@ -114,26 +114,26 @@ TEST_F(TabDelegateSyncAdapterTest, CallbackCount) { |
TEST_F(TabDelegateSyncAdapterTest, OnSyncConfigurationCompleted) { |
ASSERT_EQ(0, CallbackCount()); |
- observer()->OnSyncConfigurationCompleted(); |
+ observer()->OnSyncConfigurationCompleted(&service_); |
EXPECT_EQ(0, CallbackCount()); |
SetHasOpenTabs(true); |
- observer()->OnSyncConfigurationCompleted(); |
+ observer()->OnSyncConfigurationCompleted(&service_); |
EXPECT_EQ(0, CallbackCount()); |
} |
// OnForeignSessionUpdated should always trigger a callback. |
TEST_F(TabDelegateSyncAdapterTest, OnForeignSessionUpdated) { |
ASSERT_EQ(0, CallbackCount()); |
- observer()->OnForeignSessionUpdated(); |
+ observer()->OnForeignSessionUpdated(&service_); |
EXPECT_EQ(1, CallbackCount()); |
- observer()->OnForeignSessionUpdated(); |
+ observer()->OnForeignSessionUpdated(&service_); |
EXPECT_EQ(2, CallbackCount()); |
SetHasOpenTabs(true); |
- observer()->OnForeignSessionUpdated(); |
+ observer()->OnForeignSessionUpdated(&service_); |
EXPECT_EQ(3, CallbackCount()); |
- observer()->OnForeignSessionUpdated(); |
+ observer()->OnForeignSessionUpdated(&service_); |
EXPECT_EQ(4, CallbackCount()); |
} |
@@ -141,10 +141,10 @@ TEST_F(TabDelegateSyncAdapterTest, OnForeignSessionUpdated) { |
// OnStateChanged should not trigger a callback. |
TEST_F(TabDelegateSyncAdapterTest, OnForeignSessionUpdatedUpdatesState) { |
SetHasOpenTabs(true); |
- observer()->OnForeignSessionUpdated(); |
+ observer()->OnForeignSessionUpdated(&service_); |
EXPECT_EQ(1, CallbackCount()); |
- observer()->OnStateChanged(); |
+ observer()->OnStateChanged(&service_); |
EXPECT_EQ(1, CallbackCount()); |
} |