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

Unified Diff: test/UpdateCheck.cpp

Issue 29442619: Noissue - optimize UpdateCheck tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 19, 2017, 4:45 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/UpdateCheck.cpp
diff --git a/test/UpdateCheck.cpp b/test/UpdateCheck.cpp
index a91d1ceef826dbcfc3025427d89895face43d32c..c6036395f22c21040fa5802487ad18d43d88e2c6 100644
--- a/test/UpdateCheck.cpp
+++ b/test/UpdateCheck.cpp
@@ -50,10 +50,9 @@ namespace
{
eventCallbackCalled = false;
updateCallbackCalled = false;
- Reset();
}
- void Reset()
+ void CreateFilterEngine()
{
JsEngineCreationParameters jsEngineParams;
jsEngineParams.appInfo = appInfo;
@@ -111,7 +110,7 @@ TEST_F(UpdateCheckTest, RequestFailure)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = false;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
auto requestUrl = ProcessPendingUpdateWebRequest();
@@ -148,7 +147,7 @@ TEST_F(UpdateCheckTest, UpdateAvailable)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = true;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
auto requestUrl = ProcessPendingUpdateWebRequest();
@@ -187,7 +186,7 @@ TEST_F(UpdateCheckTest, ApplicationUpdateAvailable)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = true;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
ProcessPendingUpdateWebRequest();
@@ -210,7 +209,7 @@ TEST_F(UpdateCheckTest, WrongApplication)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = true;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
ProcessPendingUpdateWebRequest();
@@ -232,7 +231,7 @@ TEST_F(UpdateCheckTest, WrongVersion)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = true;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
ProcessPendingUpdateWebRequest();
@@ -254,7 +253,7 @@ TEST_F(UpdateCheckTest, WrongURL)
appInfo.applicationVersion = "2";
appInfo.developmentBuild = true;
- Reset();
+ CreateFilterEngine();
ForceUpdateCheck();
ProcessPendingUpdateWebRequest();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld