Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/Notification.cpp

Issue 29497591: Issue 5180 - remove synchronous WebRequest interface and stop exposing of DefaultWebRequest (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 25, 2017, 2:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/WebRequestJsObject.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Notification.cpp
diff --git a/test/Notification.cpp b/test/Notification.cpp
index 64fa4560fc16c082ecfd67c21241c80a6652161c..376ea08147e5547b6fc52f5182c5a911db2e8e05 100644
--- a/test/Notification.cpp
+++ b/test/Notification.cpp
@@ -63,7 +63,7 @@ namespace
}
};
- class MockWebRequest : public WebRequest
+ class MockWebRequest : public IWebRequest
{
public:
std::string responseText;
@@ -71,18 +71,18 @@ namespace
: responseText(notification)
{
}
- ServerResponse GET(const std::string& url,
- const HeaderList& requestHeaders) const
+ void GET(const std::string& url, const HeaderList& requestHeaders,
+ const GetCallback& getCallback) override
{
if (url.find("/notification.json") == std::string::npos)
{
- return ServerResponse();
+ return;
}
ServerResponse serverResponse;
serverResponse.status = IWebRequest::NS_OK;
serverResponse.responseStatus = 200;
serverResponse.responseText = responseText;
- return serverResponse;
+ getCallback(serverResponse);
}
};
« no previous file with comments | « src/WebRequestJsObject.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld