Make secondary account sync tests share a single TestURLLoaderFactory.

Before this change, these tests had multiple TestURLLoaderFactory
instances. One, which is declared in SyncTest, plus an additional
instance each time BuildFakeGaiaCookieManagerServiceWithOptions was

Eventually, FakeGCMS will be eliminated entirely in these tests. This
change separates out one of the logical side effects of eliminating
FakeGCMS, which that there will be a single TestURLLoaderFactory

We are splitting out this change to be able to verify whether the switch
to a single shared factory was the cause of the flake in Our
suspicion is that the flake was rather caused by the fact that in that
CL, the TestURLLoaderFactory was *not* used by the main profile, whereas
prior to that CL FakeGCMS instances had been installed for all Profiles.

Assuming that this change sticks, we will follow it up by hiding the
usage of |test_url_loader_factory_| inside a new SecondarySyncTest
class, thus eliminating the passing of the raw pointer.

This is part of step 1a of the plan to eliminate FakeGCMS entirely:

https: //
Change-Id: I86837090af84e94bdd9887ac9ee5e9c96bbef8da
Bug: 907782
Commit-Queue: Lowell Manners <>
Reviewed-by: Colin Blundell <>
Reviewed-by: Marc Treib <>
Cr-Commit-Position: refs/heads/master@{#623188}
6 files changed