Index: test/JsEngine.cpp |
=================================================================== |
--- a/test/JsEngine.cpp |
+++ b/test/JsEngine.cpp |
@@ -62,19 +62,19 @@ |
value = jsEngine->NewObject(); |
ASSERT_TRUE(value->IsObject()); |
ASSERT_EQ(0u, value->GetOwnPropertyNames().size()); |
} |
TEST_F(JsEngineTest, EventCallbacks) |
{ |
bool callbackCalled = false; |
- AdblockPlus::JsValueList callbackParams; |
+ AdblockPlus::JsConstValueList callbackParams; |
auto Callback = [&callbackCalled, & callbackParams]( |
- const AdblockPlus::JsValueList& params) |
+ const AdblockPlus::JsConstValueList& params) |
{ |
callbackCalled = true; |
callbackParams = params; |
}; |
// Trigger event without a callback |
callbackCalled = false; |
jsEngine->Evaluate("_triggerEvent('foobar')"); |
@@ -123,14 +123,14 @@ |
AdblockPlus::WebRequestPtr webRequest(new AdblockPlus::DefaultWebRequest()); |
jsEngine->SetWebRequest(webRequest); |
ASSERT_EQ(webRequest, jsEngine->GetWebRequest()); |
} |
TEST(NewJsEngineTest, GlobalPropertyTest) |
{ |
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New()); |
- jsEngine->SetGlobalProperty("foo", jsEngine->NewValue("bar")); |
+ jsEngine->SetGlobalProperty("foo", *jsEngine->NewValue("bar")); |
AdblockPlus::JsValuePtr foo = jsEngine->Evaluate("foo"); |
ASSERT_TRUE(foo->IsString()); |
ASSERT_EQ(foo->AsString(), "bar"); |
} |