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

Unified Diff: test/AppInfoJsObject.cpp

Issue 29508569: Issue 5450 - don't expose std::shared_ptr<JsEngine> (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Aug. 7, 2017, 8:39 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/Platform.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/AppInfoJsObject.cpp
diff --git a/test/AppInfoJsObject.cpp b/test/AppInfoJsObject.cpp
index 563264c0577c94c833fc5e8d290fecd0abd4ef80..e3c4d60082d51c2a107f2a12519a547d94f17d8d 100644
--- a/test/AppInfoJsObject.cpp
+++ b/test/AppInfoJsObject.cpp
@@ -30,22 +30,21 @@ TEST(AppInfoJsObjectTest, AllProperties)
appInfo.developmentBuild = true;
AdblockPlus::Platform platform{ThrowingPlatformCreationParameters()};
platform.SetUpJsEngine(appInfo);
- ASSERT_EQ("1", platform.GetJsEngine()->Evaluate("_appInfo.version").AsString());
- ASSERT_EQ("3", platform.GetJsEngine()->Evaluate("_appInfo.name").AsString());
- ASSERT_EQ("4", platform.GetJsEngine()->Evaluate("_appInfo.application").AsString());
- ASSERT_EQ("5", platform.GetJsEngine()->Evaluate("_appInfo.applicationVersion").AsString());
- ASSERT_EQ("2", platform.GetJsEngine()->Evaluate("_appInfo.locale").AsString());
- ASSERT_TRUE(platform.GetJsEngine()->Evaluate("_appInfo.developmentBuild").AsBool());
+ ASSERT_EQ("1", platform.GetJsEngine().Evaluate("_appInfo.version").AsString());
+ ASSERT_EQ("3", platform.GetJsEngine().Evaluate("_appInfo.name").AsString());
+ ASSERT_EQ("4", platform.GetJsEngine().Evaluate("_appInfo.application").AsString());
+ ASSERT_EQ("5", platform.GetJsEngine().Evaluate("_appInfo.applicationVersion").AsString());
+ ASSERT_EQ("2", platform.GetJsEngine().Evaluate("_appInfo.locale").AsString());
+ ASSERT_TRUE(platform.GetJsEngine().Evaluate("_appInfo.developmentBuild").AsBool());
}
TEST(AppInfoJsObjectTest, DefaultPropertyValues)
{
AdblockPlus::Platform platform{ThrowingPlatformCreationParameters()};
- platform.SetUpJsEngine();
- ASSERT_EQ("", platform.GetJsEngine()->Evaluate("_appInfo.version").AsString());
- ASSERT_EQ("", platform.GetJsEngine()->Evaluate("_appInfo.name").AsString());
- ASSERT_EQ("", platform.GetJsEngine()->Evaluate("_appInfo.application").AsString());
- ASSERT_EQ("", platform.GetJsEngine()->Evaluate("_appInfo.applicationVersion").AsString());
- ASSERT_EQ("", platform.GetJsEngine()->Evaluate("_appInfo.locale").AsString());
- ASSERT_FALSE(platform.GetJsEngine()->Evaluate("_appInfo.developmentBuild").AsBool());
+ ASSERT_EQ("", platform.GetJsEngine().Evaluate("_appInfo.version").AsString());
+ ASSERT_EQ("", platform.GetJsEngine().Evaluate("_appInfo.name").AsString());
+ ASSERT_EQ("", platform.GetJsEngine().Evaluate("_appInfo.application").AsString());
+ ASSERT_EQ("", platform.GetJsEngine().Evaluate("_appInfo.applicationVersion").AsString());
+ ASSERT_EQ("", platform.GetJsEngine().Evaluate("_appInfo.locale").AsString());
+ ASSERT_FALSE(platform.GetJsEngine().Evaluate("_appInfo.developmentBuild").AsBool());
}
« no previous file with comments | « src/Platform.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld