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

Unified Diff: test/JsEngine.cpp

Issue 5653480979038208: Issue 2325 - Add a way to set settings in libadblockplus for FRP and automatic updates (Closed)
Patch Set: Address more comments Created June 22, 2015, 7:45 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/JsEngine.cpp ('k') | test/Prefs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/JsEngine.cpp
===================================================================
--- a/test/JsEngine.cpp
+++ b/test/JsEngine.cpp
@@ -124,3 +124,13 @@
jsEngine->SetWebRequest(webRequest);
ASSERT_EQ(webRequest, jsEngine->GetWebRequest());
}
+
+TEST(NewJsEngineTest, GlobalPropertyTest)
+{
+ AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New());
+ jsEngine->SetGlobalProperty("foo", jsEngine->NewValue("bar"));
+ AdblockPlus::JsValuePtr foo = jsEngine->Evaluate("foo");
+ ASSERT_TRUE(foo->IsString());
+ ASSERT_EQ(foo->AsString(), "bar");
+}
+
« no previous file with comments | « src/JsEngine.cpp ('k') | test/Prefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld