asset:// URLs are local to the executable path now
This commit is contained in:
@@ -15,12 +15,12 @@ TEST_F(Storage, HTTPHeaderParsing) {
|
||||
DefaultFileSource fs(nullptr, uv_default_loop());
|
||||
|
||||
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test?modified=1420794326&expires=1420797926&etag=foo" }, uv_default_loop(), [&](const Response &res) {
|
||||
EXPECT_EQ(res.status, Response::Successful);
|
||||
EXPECT_EQ(res.data, "Hello World!");
|
||||
EXPECT_EQ(res.expires, 1420797926);
|
||||
EXPECT_EQ(res.modified, 1420794326);
|
||||
EXPECT_EQ(res.etag, "foo");
|
||||
EXPECT_EQ(res.message, "");
|
||||
EXPECT_EQ(Response::Successful, res.status);
|
||||
EXPECT_EQ("Hello World!", res.data);
|
||||
EXPECT_EQ(1420797926, res.expires);
|
||||
EXPECT_EQ(1420794326, res.modified);
|
||||
EXPECT_EQ("foo", res.etag);
|
||||
EXPECT_EQ("", res.message);
|
||||
HTTPExpiresTest.finish();
|
||||
});
|
||||
|
||||
@@ -29,12 +29,12 @@ TEST_F(Storage, HTTPHeaderParsing) {
|
||||
std::chrono::system_clock::now().time_since_epoch()).count();
|
||||
|
||||
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test?cachecontrol=max-age=120" }, uv_default_loop(), [&](const Response &res) {
|
||||
EXPECT_EQ(res.status, Response::Successful);
|
||||
EXPECT_EQ(res.data, "Hello World!");
|
||||
EXPECT_LT(std::abs(res.expires - now - 120), 2) << "Expiration date isn't about 120 seconds in the future";
|
||||
EXPECT_EQ(res.modified, 0);
|
||||
EXPECT_EQ(res.etag, "");
|
||||
EXPECT_EQ(res.message, "");
|
||||
EXPECT_EQ(Response::Successful, res.status);
|
||||
EXPECT_EQ("Hello World!", res.data);
|
||||
EXPECT_GT(2, std::abs(res.expires - now - 120)) << "Expiration date isn't about 120 seconds in the future";
|
||||
EXPECT_EQ(0, res.modified);
|
||||
EXPECT_EQ("", res.etag);
|
||||
EXPECT_EQ("", res.message);
|
||||
HTTPCacheControlTest.finish();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user