Index: test/BaseJsTest.h |
=================================================================== |
--- a/test/BaseJsTest.h |
+++ b/test/BaseJsTest.h |
@@ -104,42 +104,70 @@ |
class ThrowingFileSystem : public AdblockPlus::FileSystem |
{ |
public: |
std::shared_ptr<std::istream> Read(const std::string& path) const |
{ |
throw std::runtime_error("Not implemented"); |
} |
+ void Read(const std::string& path, |
+ const ReadCallback& callback) const |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
void Write(const std::string& path, std::istream& content) |
{ |
throw std::runtime_error("Not implemented"); |
} |
+ void Write(const std::string& path, std::istream& data, |
+ const Callback& callback) |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
void Move(const std::string& fromPath, const std::string& toPath) |
{ |
throw std::runtime_error("Not implemented"); |
} |
+ void Move(const std::string& fromPath, const std::string& toPath, |
+ const Callback& callback) |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
void Remove(const std::string& path) |
{ |
throw std::runtime_error("Not implemented"); |
} |
+ void Remove(const std::string& path, const Callback& callback) |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
StatResult Stat(const std::string& path) const |
{ |
throw std::runtime_error("Not implemented"); |
} |
+ void Stat(const std::string& path, |
+ const StatCallback& callback) const |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
std::string Resolve(const std::string& path) const |
{ |
throw std::runtime_error("Not implemented"); |
} |
- |
+ void Resolve(const std::string& path, |
+ const ResolveCallback& callback) const |
+ { |
+ throw std::runtime_error("Not implemented"); |
+ } |
}; |
class ThrowingWebRequest : public AdblockPlus::IWebRequest |
{ |
public: |
void GET(const std::string& url, const AdblockPlus::HeaderList& requestHeaders, const GetCallback&) override |
{ |
throw std::runtime_error("Unexpected GET: " + url); |
@@ -154,43 +182,71 @@ |
std::string dummyData(""); |
if (path == "patterns.ini") |
dummyData = "# Adblock Plus preferences\n[Subscription]\nurl=~fl~"; |
else if (path == "prefs.json") |
dummyData = "{}"; |
return std::shared_ptr<std::istream>(new std::istringstream(dummyData)); |
} |
+ void Read(const std::string& path, const ReadCallback& callback) const |
+ { |
+ } |
+ |
void Write(const std::string& path, std::istream& content) |
{ |
} |
+ void Write(const std::string& path, std::istream& data, |
+ const Callback& callback) |
+ { |
+ } |
+ |
void Move(const std::string& fromPath, const std::string& toPath) |
{ |
} |
+ void Move(const std::string& fromPath, const std::string& toPath, |
+ const Callback& callback) |
+ { |
+ } |
+ |
void Remove(const std::string& path) |
{ |
} |
+ void Remove(const std::string& path, const Callback& callback) |
+ { |
+ } |
+ |
StatResult Stat(const std::string& path) const |
{ |
StatResult result; |
if (path == "patterns.ini") |
{ |
result.exists = true; |
result.isFile = true; |
} |
return result; |
} |
+ void Stat(const std::string& path, |
+ const StatCallback& callback) const |
+ { |
+ } |
+ |
std::string Resolve(const std::string& path) const |
{ |
return path; |
} |
+ |
+ void Resolve(const std::string& path, |
+ const ResolveCallback& callback) const |
+ { |
+ } |
}; |
class NoopWebRequest : public AdblockPlus::IWebRequest |
{ |
public: |
void GET(const std::string& url, const AdblockPlus::HeaderList& requestHeaders, const GetCallback& callback) override |
{ |
} |