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

Unified Diff: test/UpdateCheck.cpp

Issue 29417624: Issue 5034 - Part 4: JsEngine::Evaluate() return a JsValue (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Rebased again Created April 20, 2017, 1:02 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 | « test/JsValue.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/UpdateCheck.cpp
===================================================================
--- a/test/UpdateCheck.cpp
+++ b/test/UpdateCheck.cpp
@@ -115,18 +115,18 @@
AdblockPlus::Sleep(100);
ASSERT_FALSE(eventCallbackCalled);
ASSERT_TRUE(updateCallbackCalled);
ASSERT_FALSE(updateError.empty());
std::string expectedUrl(filterEngine->GetPref("update_url_release").AsString());
- std::string platform = jsEngine->Evaluate("require('info').platform")->AsString();
- std::string platformVersion = jsEngine->Evaluate("require('info').platformVersion")->AsString();
+ std::string platform = jsEngine->Evaluate("require('info').platform").AsString();
+ std::string platformVersion = jsEngine->Evaluate("require('info').platformVersion").AsString();
FindAndReplace(expectedUrl, "%NAME%", appInfo.name);
FindAndReplace(expectedUrl, "%TYPE%", "1"); // manual update
expectedUrl += "&addonName=" + appInfo.name +
"&addonVersion=" + appInfo.version +
"&application=" + appInfo.application +
"&applicationVersion=" + appInfo.applicationVersion +
"&platform=" + platform +
@@ -154,18 +154,18 @@
ASSERT_TRUE(eventCallbackCalled);
ASSERT_EQ(1u, eventCallbackParams.size());
ASSERT_EQ("https://foo.bar/", eventCallbackParams[0].AsString());
ASSERT_TRUE(updateCallbackCalled);
ASSERT_TRUE(updateError.empty());
std::string expectedUrl(filterEngine->GetPref("update_url_devbuild").AsString());
- std::string platform = jsEngine->Evaluate("require('info').platform")->AsString();
- std::string platformVersion = jsEngine->Evaluate("require('info').platformVersion")->AsString();
+ std::string platform = jsEngine->Evaluate("require('info').platform").AsString();
+ std::string platformVersion = jsEngine->Evaluate("require('info').platformVersion").AsString();
FindAndReplace(expectedUrl, "%NAME%", appInfo.name);
FindAndReplace(expectedUrl, "%TYPE%", "1"); // manual update
expectedUrl += "&addonName=" + appInfo.name +
"&addonVersion=" + appInfo.version +
"&application=" + appInfo.application +
"&applicationVersion=" + appInfo.applicationVersion +
"&platform=" + platform +
« no previous file with comments | « test/JsValue.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld