summaryrefslogtreecommitdiff
path: root/test/map
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-10 12:36:53 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-17 01:01:15 +0100
commit50f0f919c38a905b8b169fcbd3e77c03bf48d17b (patch)
treee5b798dcca7afabf89f80c9c4810861c22db13e5 /test/map
parent5479b75c9fa971332aadfede6b380267eebbd566 (diff)
downloadqtlocation-mapboxgl-50f0f919c38a905b8b169fcbd3e77c03bf48d17b.tar.gz
[test] Use shared headless display
Prevents some OpenGL implementations from bailing out.
Diffstat (limited to 'test/map')
-rw-r--r--test/map/map.test.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 741aa869f3..682060324e 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -23,7 +23,7 @@ using namespace std::literals::string_literals;
struct MapTest {
util::RunLoop runLoop;
- HeadlessBackend backend;
+ HeadlessBackend backend { test::sharedDisplay() };
OffscreenView view { backend.getContext() };
StubFileSource fileSource;
ThreadPool threadPool { 4 };
@@ -447,6 +447,10 @@ TEST(Map, DontLoadUnneededTiles) {
class MockBackend : public HeadlessBackend {
public:
+ MockBackend(std::shared_ptr<HeadlessDisplay> display_)
+ : HeadlessBackend(display_) {
+ }
+
std::function<void()> callback;
void invalidate() override {
if (callback) {
@@ -457,7 +461,7 @@ public:
TEST(Map, TEST_DISABLED_ON_CI(ContinuousRendering)) {
util::RunLoop runLoop;
- MockBackend backend;
+ MockBackend backend { test::sharedDisplay() };
OffscreenView view { backend.getContext() };
ThreadPool threadPool { 4 };