From bd553de7bc5899a8e4a3a9c5e1d27a9f4d10e90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 25 Jul 2017 11:29:03 +0200 Subject: [test] add ability to take the OnlineFileSource offline This functionality is used for testing to ensure correct offline behavior when connectivity is missing. --- include/mbgl/storage/default_file_source.hpp | 1 + include/mbgl/storage/online_file_source.hpp | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 9911e0ce67..91e442cf85 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -140,6 +140,7 @@ public: void resume(); // For testing only. + void setOnlineStatus(bool); void put(const Resource&, const Response&); class Impl; diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp index ffd75662e6..28d70ce544 100644 --- a/include/mbgl/storage/online_file_source.hpp +++ b/include/mbgl/storage/online_file_source.hpp @@ -24,6 +24,9 @@ public: std::unique_ptr request(const Resource&, Callback) override; + // For testing only. + void setOnlineStatus(bool); + private: friend class OnlineFileRequest; -- cgit v1.2.1