summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-23 15:47:26 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-24 08:17:42 -0800
commit845699e69899cec95254ce5ab244e88210b23298 (patch)
tree4f117e8ece66d57f55bd5bb571c48dba3e5f28ff /test/style
parent338f94e7ed73f6b0685f406ac1a8cf389b2aacbb (diff)
downloadqtlocation-mapboxgl-845699e69899cec95254ce5ab244e88210b23298.tar.gz
[tests] Simplify MockFileSource
Diffstat (limited to 'test/style')
-rw-r--r--test/style/glyph_store.cpp6
-rw-r--r--test/style/pending_resources.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/test/style/glyph_store.cpp b/test/style/glyph_store.cpp
index f177036d87..a53b20c6d2 100644
--- a/test/style/glyph_store.cpp
+++ b/test/style/glyph_store.cpp
@@ -109,15 +109,15 @@ TEST(GlyphStore, LoadingCorrupted) {
}
TEST(GlyphStore, LoadingCancel) {
- GlyphStoreTest test(MockFileSource::SuccessWithDelay, "glyphs.pbf");
+ GlyphStoreTest test(MockFileSource::Success, "glyphs.pbf");
test.observer.glyphsLoaded = [&] (const std::string&, const GlyphRange&) {
FAIL() << "Should never be called";
};
- test.fileSource.setOnRequestDelayedCallback([&]{
+ test.fileSource.requestEnqueuedCallback = [&]{
test.end();
- });
+ };
test.run(
"test/fixtures/resources/glyphs.pbf",
diff --git a/test/style/pending_resources.cpp b/test/style/pending_resources.cpp
index e87de1a31b..62aee032da 100644
--- a/test/style/pending_resources.cpp
+++ b/test/style/pending_resources.cpp
@@ -24,7 +24,7 @@ TEST_P(PendingResources, DeleteMapObjectWithPendingRequest) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1, 1000, 1000);
- MockFileSource fileSource(MockFileSource::SuccessWithDelay, GetParam());
+ MockFileSource fileSource(MockFileSource::Success, GetParam());
std::unique_ptr<Map> map = std::make_unique<Map>(view, fileSource, MapMode::Still);
@@ -34,7 +34,7 @@ TEST_P(PendingResources, DeleteMapObjectWithPendingRequest) {
});
endTest.unref();
- fileSource.setOnRequestDelayedCallback([&endTest] { endTest.send(); });
+ fileSource.requestEnqueuedCallback = [&endTest] { endTest.send(); };
const std::string style = util::read_file("test/fixtures/resources/style.json");
map->setStyleJSON(style, ".");