summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-03-07 22:10:41 -0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-03-08 10:31:01 -0300
commitb8b283588f59db539715217aba164a380e053ea5 (patch)
tree4493e6f239732f29c7f5cdd57150874b21a8b273 /test
parentfa7c40c37fc2078b181f77afc808fdc4cd1baae9 (diff)
downloadqtlocation-mapboxgl-b8b283588f59db539715217aba164a380e053ea5.tar.gz
[core] Remove goOffline() from DefaultFileSource
Use the newly added NetworkStatus::Set().
Diffstat (limited to 'test')
-rw-r--r--test/api/offline.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/api/offline.cpp b/test/api/offline.cpp
index f168ff71f5..9940432e3f 100644
--- a/test/api/offline.cpp
+++ b/test/api/offline.cpp
@@ -2,6 +2,7 @@
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/platform/default/headless_view.hpp>
+#include <mbgl/storage/network_status.hpp>
#include <mbgl/storage/offline_database.hpp>
#include <mbgl/storage/default_file_source.hpp>
@@ -38,7 +39,7 @@ TEST(API, Offline) {
fileSource.put(Resource::spriteImage(prefix + "/offline/sprite", 1.0), expiredItem("offline/sprite.png"));
fileSource.put(Resource::tile(prefix + "/offline/{z}-{x}-{y}.vector.pbf", 1.0, 0, 0, 0), expiredItem("offline/0-0-0.vector.pbf"));
fileSource.put(Resource::glyphs(prefix + "/offline/{fontstack}/{range}.pbf", "Helvetica", {0, 255}), expiredItem("offline/glyph.pbf"));
- fileSource.goOffline();
+ NetworkStatus::Set(NetworkStatus::Status::Offline);
Map map(view, fileSource, MapMode::Still);
map.setStyleURL(prefix + "/offline/style.json");
@@ -47,4 +48,6 @@ TEST(API, Offline) {
test::render(map),
0.0015,
0.1);
+
+ NetworkStatus::Set(NetworkStatus::Status::Online);
}