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

Unified Diff: test/AppInfoJsObject.cpp

Issue 11157034: Update info module and make updater use the new downloader module (Closed)
Patch Set: Created July 23, 2013, 10:03 a.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/AppInfoJsObject.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/AppInfoJsObject.cpp
===================================================================
--- a/test/AppInfoJsObject.cpp
+++ b/test/AppInfoJsObject.cpp
@@ -19,31 +19,34 @@
#include <gtest/gtest.h>
TEST(AppInfoJsObjectTest, AllProperties)
{
AdblockPlus::AppInfo appInfo;
appInfo.id = "1";
appInfo.version = "2";
appInfo.name = "4";
- appInfo.platform = "5";
+ appInfo.application = "5";
+ appInfo.applicationVersion = "6";
appInfo.locale = "3";
appInfo.developmentBuild = true;
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New(appInfo));
ASSERT_EQ("1", jsEngine->Evaluate("_appInfo.id")->AsString());
ASSERT_EQ("2", jsEngine->Evaluate("_appInfo.version")->AsString());
ASSERT_EQ("4", jsEngine->Evaluate("_appInfo.name")->AsString());
- ASSERT_EQ("5", jsEngine->Evaluate("_appInfo.platform")->AsString());
+ ASSERT_EQ("5", jsEngine->Evaluate("_appInfo.application")->AsString());
+ ASSERT_EQ("6", jsEngine->Evaluate("_appInfo.applicationVersion")->AsString());
ASSERT_EQ("3", jsEngine->Evaluate("_appInfo.locale")->AsString());
ASSERT_TRUE(jsEngine->Evaluate("_appInfo.developmentBuild")->AsBool());
}
TEST(AppInfoJsObjectTest, DefaultPropertyValues)
{
AdblockPlus::AppInfo appInfo;
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New(appInfo));
ASSERT_EQ("", jsEngine->Evaluate("_appInfo.id")->AsString());
ASSERT_EQ("", jsEngine->Evaluate("_appInfo.version")->AsString());
ASSERT_EQ("", jsEngine->Evaluate("_appInfo.name")->AsString());
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.platform")->AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.application")->AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.applicationVersion")->AsString());
ASSERT_EQ("", jsEngine->Evaluate("_appInfo.locale")->AsString());
ASSERT_FALSE(jsEngine->Evaluate("_appInfo.developmentBuild")->AsBool());
}
« no previous file with comments | « src/AppInfoJsObject.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld