summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-23 14:55:12 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-23 14:55:12 -0800
commit7a6076ea9df72f34565d8f316f8c5c19279677b8 (patch)
tree0018a698e9fa97273c5b515b71ccf0b8f7398253 /test
parentd238e00d9b1e78e98392ac2cab30f8a2fcd3c1fd (diff)
downloadqtlocation-mapboxgl-7a6076ea9df72f34565d8f316f8c5c19279677b8.tar.gz
[tests] Test with OnlineFileSource
When we introduce OfflineFileSource, the behavior of existing tests should not change.
Diffstat (limited to 'test')
-rw-r--r--test/api/annotations.cpp24
-rw-r--r--test/api/api_misuse.cpp6
-rw-r--r--test/api/custom_layer.cpp4
-rw-r--r--test/api/repeated_render.cpp6
-rw-r--r--test/api/set_style.cpp4
-rw-r--r--test/miscellaneous/map.cpp10
-rw-r--r--test/miscellaneous/map_context.cpp4
-rw-r--r--test/storage/cache_response.cpp4
-rw-r--r--test/storage/cache_revalidate.cpp8
-rw-r--r--test/storage/directory_reading.cpp6
-rw-r--r--test/storage/file_reading.cpp14
-rw-r--r--test/storage/http_cancel.cpp6
-rw-r--r--test/storage/http_coalescing.cpp8
-rw-r--r--test/storage/http_error.cpp6
-rw-r--r--test/storage/http_header_parsing.cpp6
-rw-r--r--test/storage/http_issue_1369.cpp4
-rw-r--r--test/storage/http_load.cpp4
-rw-r--r--test/storage/http_other_loop.cpp4
-rw-r--r--test/storage/http_reading.cpp10
-rw-r--r--test/storage/http_retry_network_status.cpp6
-rw-r--r--test/storage/http_timeout.cpp4
21 files changed, 74 insertions, 74 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp
index 104ccd2f26..2c6bfdb679 100644
--- a/test/api/annotations.cpp
+++ b/test/api/annotations.cpp
@@ -6,7 +6,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/platform/default/headless_view.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/io.hpp>
#include <future>
@@ -27,7 +27,7 @@ void checkRendering(Map& map, const char * name) {
TEST(Annotations, PointAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -40,7 +40,7 @@ TEST(Annotations, PointAnnotation) {
TEST(Annotations, LineAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -59,7 +59,7 @@ TEST(Annotations, LineAnnotation) {
TEST(Annotations, FillAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -77,7 +77,7 @@ TEST(Annotations, FillAnnotation) {
TEST(Annotations, StyleSourcedShapeAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"), "");
@@ -92,7 +92,7 @@ TEST(Annotations, StyleSourcedShapeAnnotation) {
TEST(Annotations, AddMultiple) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -109,7 +109,7 @@ TEST(Annotations, AddMultiple) {
TEST(Annotations, NonImmediateAdd) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -129,7 +129,7 @@ TEST(Annotations, NonImmediateAdd) {
TEST(Annotations, UpdatePoint) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -148,7 +148,7 @@ TEST(Annotations, UpdatePoint) {
TEST(Annotations, RemovePoint) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -165,7 +165,7 @@ TEST(Annotations, RemovePoint) {
TEST(Annotations, RemoveShape) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
AnnotationSegments segments = {{ {{ { 0, 0 }, { 45, 45 } }} }};
@@ -187,7 +187,7 @@ TEST(Annotations, RemoveShape) {
TEST(Annotations, ImmediateRemoveShape) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.removeAnnotation(map.addShapeAnnotation(ShapeAnnotation({}, {})));
@@ -199,7 +199,7 @@ TEST(Annotations, ImmediateRemoveShape) {
TEST(Annotations, SwitchStyle) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
diff --git a/test/api/api_misuse.cpp b/test/api/api_misuse.cpp
index 538f09a040..3ac6939b49 100644
--- a/test/api/api_misuse.cpp
+++ b/test/api/api_misuse.cpp
@@ -4,7 +4,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/platform/default/headless_view.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/exception.hpp>
#include <future>
@@ -18,7 +18,7 @@ TEST(API, RenderWithoutCallback) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
view.resize(128, 512);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
std::unique_ptr<Map> map = std::make_unique<Map>(view, fileSource, MapMode::Still);
map->renderStill(nullptr);
@@ -40,7 +40,7 @@ TEST(API, RenderWithoutStyle) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
view.resize(128, 512);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
diff --git a/test/api/custom_layer.cpp b/test/api/custom_layer.cpp
index e98e2cfc0b..efe63d74c9 100644
--- a/test/api/custom_layer.cpp
+++ b/test/api/custom_layer.cpp
@@ -3,7 +3,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/platform/default/headless_view.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/layer/custom_layer.hpp>
#include <mbgl/util/io.hpp>
#include <mbgl/util/mat4.hpp>
@@ -66,7 +66,7 @@ public:
TEST(CustomLayer, Basic) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
diff --git a/test/api/repeated_render.cpp b/test/api/repeated_render.cpp
index d3d3926a49..0b2a87cc33 100644
--- a/test/api/repeated_render.cpp
+++ b/test/api/repeated_render.cpp
@@ -4,7 +4,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
@@ -18,9 +18,9 @@ TEST(API, RepeatedRender) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1, 256, 512);
#ifdef MBGL_ASSET_ZIP
- DefaultFileSource fileSource(nullptr, "test/fixtures/api/assets.zip");
+ OnlineFileSource fileSource(nullptr, "test/fixtures/api/assets.zip");
#else
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
#endif
Log::setObserver(std::make_unique<FixtureLogObserver>());
diff --git a/test/api/set_style.cpp b/test/api/set_style.cpp
index 23dff0152c..f5c1592516 100644
--- a/test/api/set_style.cpp
+++ b/test/api/set_style.cpp
@@ -4,7 +4,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
TEST(API, SetStyle) {
@@ -12,7 +12,7 @@ TEST(API, SetStyle) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Log::setObserver(std::make_unique<FixtureLogObserver>());
diff --git a/test/miscellaneous/map.cpp b/test/miscellaneous/map.cpp
index fdd33c1466..ed63bb085c 100644
--- a/test/miscellaneous/map.cpp
+++ b/test/miscellaneous/map.cpp
@@ -3,7 +3,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
using namespace mbgl;
@@ -12,7 +12,7 @@ TEST(Map, PauseResume) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Continuous);
@@ -25,7 +25,7 @@ TEST(Map, DoublePause) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Continuous);
@@ -39,7 +39,7 @@ TEST(Map, ResumeWithoutPause) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Continuous);
@@ -51,7 +51,7 @@ TEST(Map, DestroyPaused) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Continuous);
diff --git a/test/miscellaneous/map_context.cpp b/test/miscellaneous/map_context.cpp
index 9645572358..60cb3d6b7f 100644
--- a/test/miscellaneous/map_context.cpp
+++ b/test/miscellaneous/map_context.cpp
@@ -4,7 +4,7 @@
#include <mbgl/map/map_context.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/thread.hpp>
using namespace mbgl;
@@ -12,7 +12,7 @@ using namespace mbgl;
TEST(MapContext, DoubleStyleLoad) {
std::shared_ptr<HeadlessDisplay> display = std::make_shared<HeadlessDisplay>();
HeadlessView view(display, 1, 512, 512);
- DefaultFileSource fileSource(nullptr);
+ OnlineFileSource fileSource(nullptr);
util::Thread<MapContext> context({"Map", util::ThreadType::Map, util::ThreadPriority::Regular},
view, fileSource, MapMode::Continuous, GLContextMode::Unique, view.getPixelRatio());
diff --git a/test/storage/cache_response.cpp b/test/storage/cache_response.cpp
index 8207460aa4..16a9c3d47a 100644
--- a/test/storage/cache_response.cpp
+++ b/test/storage/cache_response.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/sqlite_cache.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -12,7 +12,7 @@ TEST_F(Storage, CacheResponse) {
util::RunLoop loop;
SQLiteCache cache(":memory:");
- DefaultFileSource fs(&cache);
+ OnlineFileSource fs(&cache);
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/cache" };
Response response;
diff --git a/test/storage/cache_revalidate.cpp b/test/storage/cache_revalidate.cpp
index ab7fcd5d24..e0e0672ad5 100644
--- a/test/storage/cache_revalidate.cpp
+++ b/test/storage/cache_revalidate.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/sqlite_cache.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -12,7 +12,7 @@ TEST_F(Storage, CacheRevalidateSame) {
util::RunLoop loop;
SQLiteCache cache(":memory:");
- DefaultFileSource fs(&cache);
+ OnlineFileSource fs(&cache);
const Resource revalidateSame { Resource::Unknown, "http://127.0.0.1:3000/revalidate-same" };
std::unique_ptr<FileRequest> req1;
@@ -72,7 +72,7 @@ TEST_F(Storage, CacheRevalidateModified) {
util::RunLoop loop;
SQLiteCache cache(":memory:");
- DefaultFileSource fs(&cache);
+ OnlineFileSource fs(&cache);
const Resource revalidateModified{ Resource::Unknown,
"http://127.0.0.1:3000/revalidate-modified" };
@@ -132,7 +132,7 @@ TEST_F(Storage, CacheRevalidateEtag) {
util::RunLoop loop;
SQLiteCache cache(":memory:");
- DefaultFileSource fs(&cache);
+ OnlineFileSource fs(&cache);
const Resource revalidateEtag { Resource::Unknown, "http://127.0.0.1:3000/revalidate-etag" };
std::unique_ptr<FileRequest> req1;
diff --git a/test/storage/directory_reading.cpp b/test/storage/directory_reading.cpp
index 5ef2983abf..2e6b90f0d3 100644
--- a/test/storage/directory_reading.cpp
+++ b/test/storage/directory_reading.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -12,9 +12,9 @@ TEST_F(Storage, AssetReadDirectory) {
util::RunLoop loop;
#ifdef MBGL_ASSET_ZIP
- DefaultFileSource fs(nullptr, "test/fixtures/storage/assets.zip");
+ OnlineFileSource fs(nullptr, "test/fixtures/storage/assets.zip");
#else
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
#endif
std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage" }, [&](Response res) {
diff --git a/test/storage/file_reading.cpp b/test/storage/file_reading.cpp
index 7565ad3d66..757decb612 100644
--- a/test/storage/file_reading.cpp
+++ b/test/storage/file_reading.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -18,7 +18,7 @@ std::string getFileSourceRoot() {
class TestWorker {
public:
- TestWorker(mbgl::DefaultFileSource* fs_) : fs(fs_) {}
+ TestWorker(mbgl::OnlineFileSource* fs_) : fs(fs_) {}
void run(std::function<void()> endCallback) {
const std::string asset("asset://TEST_DATA/fixtures/storage/nonempty");
@@ -46,7 +46,7 @@ public:
private:
unsigned numRequests = 1000;
- mbgl::DefaultFileSource* fs;
+ mbgl::OnlineFileSource* fs;
std::unique_ptr<mbgl::FileRequest> request;
std::function<void(mbgl::Response)> requestCallback;
@@ -61,7 +61,7 @@ TEST_F(Storage, AssetStress) {
util::RunLoop loop;
- mbgl::DefaultFileSource fs(nullptr, getFileSourceRoot());
+ mbgl::OnlineFileSource fs(nullptr, getFileSourceRoot());
unsigned numThreads = 50;
@@ -97,7 +97,7 @@ TEST_F(Storage, AssetEmptyFile) {
util::RunLoop loop;
- DefaultFileSource fs(nullptr, getFileSourceRoot());
+ OnlineFileSource fs(nullptr, getFileSourceRoot());
std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/empty" }, [&](Response res) {
req.reset();
@@ -122,7 +122,7 @@ TEST_F(Storage, AssetNonEmptyFile) {
util::RunLoop loop;
- DefaultFileSource fs(nullptr, getFileSourceRoot());
+ OnlineFileSource fs(nullptr, getFileSourceRoot());
std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/nonempty" }, [&](Response res) {
req.reset();
@@ -149,7 +149,7 @@ TEST_F(Storage, AssetNonExistentFile) {
util::RunLoop loop;
- DefaultFileSource fs(nullptr, getFileSourceRoot());
+ OnlineFileSource fs(nullptr, getFileSourceRoot());
std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/does_not_exist" }, [&](Response res) {
req.reset();
diff --git a/test/storage/http_cancel.cpp b/test/storage/http_cancel.cpp
index 442a159fe5..a20e78fa53 100644
--- a/test/storage/http_cancel.cpp
+++ b/test/storage/http_cancel.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -13,7 +13,7 @@ TEST_F(Storage, HTTPCancel) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
auto req =
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
@@ -31,7 +31,7 @@ TEST_F(Storage, HTTPCancelMultiple) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/test" };
diff --git a/test/storage/http_coalescing.cpp b/test/storage/http_coalescing.cpp
index a9edf00839..dc4d993b35 100644
--- a/test/storage/http_coalescing.cpp
+++ b/test/storage/http_coalescing.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -13,7 +13,7 @@ TEST_F(Storage, HTTPCoalescing) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
static const Response *reference = nullptr;
@@ -59,7 +59,7 @@ TEST_F(Storage, HTTPMultiple) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/test?expires=2147483647" };
std::unique_ptr<FileRequest> req1;
@@ -104,7 +104,7 @@ TEST_F(Storage, HTTPStale) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
int updates = 0;
int stale = 0;
diff --git a/test/storage/http_error.cpp b/test/storage/http_error.cpp
index 1889d85e00..3ed7638d48 100644
--- a/test/storage/http_error.cpp
+++ b/test/storage/http_error.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -13,7 +13,7 @@ TEST_F(Storage, HTTPTemporaryError) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const auto start = Clock::now();
@@ -60,7 +60,7 @@ TEST_F(Storage, HTTPConnectionError) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const auto start = Clock::now();
diff --git a/test/storage/http_header_parsing.cpp b/test/storage/http_header_parsing.cpp
index 9f48e995b5..72c42e8f0a 100644
--- a/test/storage/http_header_parsing.cpp
+++ b/test/storage/http_header_parsing.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -12,7 +12,7 @@ TEST_F(Storage, HTTPExpiresParsing) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
std::unique_ptr<FileRequest> req1 = fs.request({ Resource::Unknown,
"http://127.0.0.1:3000/test?modified=1420794326&expires=1420797926&etag=foo" },
@@ -38,7 +38,7 @@ TEST_F(Storage, HTTPCacheControlParsing) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const Seconds now = toSeconds(SystemClock::now());
diff --git a/test/storage/http_issue_1369.cpp b/test/storage/http_issue_1369.cpp
index fff773de88..81cf964e7c 100644
--- a/test/storage/http_issue_1369.cpp
+++ b/test/storage/http_issue_1369.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/sqlite_cache.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -23,7 +23,7 @@ TEST_F(Storage, HTTPIssue1369) {
util::RunLoop loop;
SQLiteCache cache;
- DefaultFileSource fs(&cache);
+ OnlineFileSource fs(&cache);
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/test" };
diff --git a/test/storage/http_load.cpp b/test/storage/http_load.cpp
index 947b850db6..9b37cbd231 100644
--- a/test/storage/http_load.cpp
+++ b/test/storage/http_load.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -10,7 +10,7 @@ TEST_F(Storage, HTTPLoad) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const int concurrency = 50;
const int max = 10000;
diff --git a/test/storage/http_other_loop.cpp b/test/storage/http_other_loop.cpp
index d9c90397ad..9d98f1878b 100644
--- a/test/storage/http_other_loop.cpp
+++ b/test/storage/http_other_loop.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -11,7 +11,7 @@ TEST_F(Storage, HTTPOtherLoop) {
// This file source launches a separate thread to do the processing.
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
[&](Response res) {
diff --git a/test/storage/http_reading.cpp b/test/storage/http_reading.cpp
index 3d7f9926e1..a4a7d0480d 100644
--- a/test/storage/http_reading.cpp
+++ b/test/storage/http_reading.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/exception.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -14,7 +14,7 @@ TEST_F(Storage, HTTPTest) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
std::unique_ptr<FileRequest> req1 = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
[&](Response res) {
@@ -40,7 +40,7 @@ TEST_F(Storage, HTTP404) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
std::unique_ptr<FileRequest> req2 = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/doesnotexist" },
[&](Response res) {
@@ -68,7 +68,7 @@ TEST_F(Storage, HTTP500) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
std::unique_ptr<FileRequest> req3 = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/permanent-error" },
[&](Response res) {
@@ -96,7 +96,7 @@ TEST_F(Storage, HTTPNoCallback) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
try {
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
diff --git a/test/storage/http_retry_network_status.cpp b/test/storage/http_retry_network_status.cpp
index 41cbed3431..7816fab01d 100644
--- a/test/storage/http_retry_network_status.cpp
+++ b/test/storage/http_retry_network_status.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -18,7 +18,7 @@ TEST_F(Storage, HTTPNetworkStatusChange) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/delayed" };
@@ -58,7 +58,7 @@ TEST_F(Storage, HTTPNetworkStatusChangePreempt) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
const auto start = Clock::now();
diff --git a/test/storage/http_timeout.cpp b/test/storage/http_timeout.cpp
index 26ce0f5c3a..241d5f5549 100644
--- a/test/storage/http_timeout.cpp
+++ b/test/storage/http_timeout.cpp
@@ -1,6 +1,6 @@
#include "storage.hpp"
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -11,7 +11,7 @@ TEST_F(Storage, HTTPTimeout) {
using namespace mbgl;
util::RunLoop loop;
- DefaultFileSource fs(nullptr);
+ OnlineFileSource fs(nullptr);
int counter = 0;