summaryrefslogtreecommitdiff
path: root/test/storage/http_header_parsing.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-04-10 22:37:27 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-04-10 22:37:27 +0200
commit4c7132337f96486a154e75efe394f5a1c06a77a7 (patch)
treea1b49335556b5f09bd51173344899e9f2446597d /test/storage/http_header_parsing.cpp
parentbd531b9e080f3300c6947b0e0e515218bb395f45 (diff)
downloadqtlocation-mapboxgl-4c7132337f96486a154e75efe394f5a1c06a77a7.tar.gz
convert DefaultFileSource to use util::Thread<>
Diffstat (limited to 'test/storage/http_header_parsing.cpp')
-rw-r--r--test/storage/http_header_parsing.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/storage/http_header_parsing.cpp b/test/storage/http_header_parsing.cpp
index e4d86fcc27..df1fb1fc68 100644
--- a/test/storage/http_header_parsing.cpp
+++ b/test/storage/http_header_parsing.cpp
@@ -4,6 +4,7 @@
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/util/chrono.hpp>
+#include <mbgl/util/thread.hpp>
#include <cmath>
@@ -13,11 +14,11 @@ TEST_F(Storage, HTTPHeaderParsing) {
using namespace mbgl;
- DefaultFileSource fs(nullptr, uv_default_loop());
+ util::Thread<DefaultFileSource> fs(nullptr);
auto &env = *static_cast<const Environment *>(nullptr);
- fs.request({ Resource::Unknown,
+ fs->request({ Resource::Unknown,
"http://127.0.0.1:3000/test?modified=1420794326&expires=1420797926&etag=foo" },
uv_default_loop(), env, [&](const Response &res) {
EXPECT_EQ(Response::Successful, res.status);
@@ -32,7 +33,7 @@ TEST_F(Storage, HTTPHeaderParsing) {
int64_t now = std::chrono::duration_cast<std::chrono::seconds>(
SystemClock::now().time_since_epoch()).count();
- fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test?cachecontrol=max-age=120" },
+ fs->request({ Resource::Unknown, "http://127.0.0.1:3000/test?cachecontrol=max-age=120" },
uv_default_loop(), env, [&](const Response &res) {
EXPECT_EQ(Response::Successful, res.status);
EXPECT_EQ("Hello World!", res.data);