diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-05-18 13:56:09 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-01 15:38:01 -0700 |
commit | aa6647e910073edffbd1f3c087ed110927c38aeb (patch) | |
tree | b112a9f14610da986f6436e8a713ae8016e08aef /test/src | |
parent | c0c1028dcf57379db68a87d8d0a1780d9d901fe5 (diff) | |
download | qtlocation-mapboxgl-aa6647e910073edffbd1f3c087ed110927c38aeb.tar.gz |
[core] Offline support for Image Sources
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/mbgl/test/stub_file_source.cpp | 3 | ||||
-rw-r--r-- | test/src/mbgl/test/stub_file_source.hpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/src/mbgl/test/stub_file_source.cpp b/test/src/mbgl/test/stub_file_source.cpp index ec0545e88c..7891d5d907 100644 --- a/test/src/mbgl/test/stub_file_source.cpp +++ b/test/src/mbgl/test/stub_file_source.cpp @@ -77,6 +77,9 @@ optional<Response> StubFileSource::defaultResponse(const Resource& resource) { case Resource::Kind::SpriteImage: if (!spriteImageResponse) throw std::runtime_error("unexpected sprite image request"); return spriteImageResponse(resource); + case Resource::Kind::Image: + if (!imageResponse) throw std::runtime_error("unexpected image request"); + return imageResponse(resource); case Resource::Kind::Unknown: throw std::runtime_error("unknown resource type"); } diff --git a/test/src/mbgl/test/stub_file_source.hpp b/test/src/mbgl/test/stub_file_source.hpp index ee4175cc3f..85118e1a77 100644 --- a/test/src/mbgl/test/stub_file_source.hpp +++ b/test/src/mbgl/test/stub_file_source.hpp @@ -29,6 +29,7 @@ public: ResponseFunction glyphsResponse; ResponseFunction spriteJSONResponse; ResponseFunction spriteImageResponse; + ResponseFunction imageResponse; private: // The default behavior is to throw if no per-kind callback has been set. |