| 54 | } |
| 55 | |
| 56 | void InitStorage(Storage & storage, Storage::UpdateCallback const & didDownload, |
| 57 | Storage::ProgressFunction const & progress) |
| 58 | { |
| 59 | auto const changeCountryFunction = [&](CountryId const & /* countryId */) |
| 60 | { |
| 61 | if (!storage.IsDownloadInProgress()) |
| 62 | { |
| 63 | // End wait for downloading complete. |
| 64 | testing::StopEventLoop(); |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | storage.Init(didDownload, [](CountryId const &, LocalFilePtr const) { return false; }); |
| 69 | storage.RegisterAllLocalMaps(); |
| 70 | storage.Subscribe(changeCountryFunction, progress); |
| 71 | storage.SetDownloadingServersForTesting({kTestWebServer}); |
| 72 | } |
| 73 | |
| 74 | class StorageHttpTest |
| 75 | { |
no test coverage detected