Lines Matching refs:helper
25 explicit MockObserver(MergeSessionHelper* helper) : helper_(helper) {
142 InstrumentedMergeSessionHelper helper(token_service(), request_context());
143 MockObserver observer(&helper);
145 EXPECT_CALL(helper, StartFetching());
148 helper.LogIn("acc1@gmail.com");
149 SimulateMergeSessionSuccess(&helper, "token");
153 InstrumentedMergeSessionHelper helper(token_service(), request_context());
154 MockObserver observer(&helper);
156 EXPECT_CALL(helper, StartFetching());
159 helper.LogIn("acc1@gmail.com");
160 SimulateMergeSessionFailure(&helper, error());
164 InstrumentedMergeSessionHelper helper(token_service(), request_context());
165 MockObserver observer(&helper);
167 EXPECT_CALL(helper, StartFetching());
170 helper.LogIn("acc1@gmail.com");
171 SimulateUbertokenFailure(&helper, error());
175 InstrumentedMergeSessionHelper helper(token_service(), request_context());
176 MockObserver observer(&helper);
178 EXPECT_CALL(helper, StartFetching()).Times(2);
182 helper.LogIn("acc1@gmail.com");
183 helper.LogIn("acc2@gmail.com");
184 SimulateMergeSessionSuccess(&helper, "token1");
185 SimulateMergeSessionSuccess(&helper, "token2");
189 InstrumentedMergeSessionHelper helper(token_service(), request_context());
190 MockObserver observer(&helper);
192 EXPECT_CALL(helper, StartFetching()).Times(2);
196 helper.LogIn("acc1@gmail.com");
197 helper.LogIn("acc2@gmail.com");
198 SimulateMergeSessionFailure(&helper, error());
199 SimulateMergeSessionSuccess(&helper, "token2");
203 InstrumentedMergeSessionHelper helper(token_service(), request_context());
204 MockObserver observer(&helper);
206 EXPECT_CALL(helper, StartFetching()).Times(2);
210 helper.LogIn("acc1@gmail.com");
211 helper.LogIn("acc2@gmail.com");
212 SimulateUbertokenFailure(&helper, error());
213 SimulateMergeSessionSuccess(&helper, "token2");
217 InstrumentedMergeSessionHelper helper(token_service(), request_context());
218 MockObserver observer(&helper);
220 EXPECT_CALL(helper, StartFetching()).Times(4);
223 helper.LogIn("acc1@gmail.com");
224 helper.LogIn("acc2@gmail.com");
226 SimulateMergeSessionSuccess(&helper, "token1");
228 helper.LogIn("acc3@gmail.com");
230 SimulateMergeSessionSuccess(&helper, "token2");
231 SimulateMergeSessionSuccess(&helper, "token3");
233 helper.LogIn("acc4@gmail.com");
235 SimulateMergeSessionSuccess(&helper, "token4");
239 InstrumentedMergeSessionHelper helper(token_service(), request_context());
240 MockObserver observer(&helper);
247 EXPECT_CALL(helper, StartLogOutUrlFetch());
248 EXPECT_CALL(helper, StartFetching()).Times(2);
252 helper.LogOut("acc2@gmail.com", current_accounts);
253 SimulateLogoutSuccess(&helper);
254 SimulateMergeSessionSuccess(&helper, "token1");
255 SimulateMergeSessionSuccess(&helper, "token3");
259 InstrumentedMergeSessionHelper helper(token_service(), request_context());
260 MockObserver observer(&helper);
270 EXPECT_CALL(helper, StartLogOutUrlFetch());
274 EXPECT_CALL(helper, StartFetching()).Times(2);
276 helper.LogIn("acc1@gmail.com");
277 helper.LogOut("acc2@gmail.com", current_accounts);
279 SimulateMergeSessionSuccess(&helper, "token1");
280 SimulateLogoutSuccess(&helper);
281 SimulateMergeSessionSuccess(&helper, "token3");
285 InstrumentedMergeSessionHelper helper(token_service(), request_context());
286 MockObserver observer(&helper);
290 EXPECT_CALL(helper, StartFetching());
293 EXPECT_CALL(helper, StartLogOutUrlFetch());
295 helper.LogIn("acc1@gmail.com");
296 helper.LogIn("acc2@gmail.com");
297 helper.LogOut("acc2@gmail.com", current_accounts);
299 SimulateMergeSessionSuccess(&helper, "token1");
300 SimulateLogoutSuccess(&helper);
304 InstrumentedMergeSessionHelper helper(token_service(), request_context());
305 MockObserver observer(&helper);
316 EXPECT_CALL(helper, StartFetching()).Times(2);
320 EXPECT_CALL(helper, StartLogOutUrlFetch());
322 helper.LogIn("acc1@gmail.com");
323 helper.LogOut("acc2@gmail.com", current_accounts1);
324 helper.LogOut("acc3@gmail.com", current_accounts2);
326 SimulateMergeSessionSuccess(&helper, "token1");
327 SimulateLogoutSuccess(&helper);
328 SimulateMergeSessionSuccess(&helper, "token1");
332 InstrumentedMergeSessionHelper helper(token_service(), request_context());
333 MergeSessionHelper::ExternalCcResultFetcher result_fetcher(&helper);
360 InstrumentedMergeSessionHelper helper(token_service(), request_context());
361 MergeSessionHelper::ExternalCcResultFetcher result_fetcher(&helper);
391 InstrumentedMergeSessionHelper helper(token_service(), request_context());
392 MergeSessionHelper::ExternalCcResultFetcher result_fetcher(&helper);