[core] invoke optional resource path change completion listener

This commit is contained in:
Łukasz Paczos
2019-05-14 14:54:24 +02:00
committed by Łukasz Paczos
parent 749044f1b0
commit 46ef2d86d2
3 changed files with 22 additions and 4 deletions

View File

@@ -572,6 +572,18 @@ TEST(DefaultFileSource, TEST_REQUIRES_SERVER(SetResourceTransform)) {
loop.run();
}
TEST(DefaultFileSource, SetResourceCachePath) {
util::RunLoop loop;
DefaultFileSource fs(":memory:", ".");
Actor<PathChangeCallback> callback(loop, [&]() -> void {
loop.stop();
});
fs.setResourceCachePath("./new_offline.db", callback.self());
loop.run();
}
// Test that a stale cache file that has must-revalidate set will trigger a response.
TEST(DefaultFileSource, TEST_REQUIRES_SERVER(RespondToStaleMustRevalidate)) {
util::RunLoop loop;