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

Unified Diff: test/WebRequest.cpp

Issue 10198022: Pass application data into libadblockplus (Closed)
Patch Set: Merged upstream, addressed issues, renamed AppInfo fields Created April 17, 2013, 2:47 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
« src/AppInfoJsObject.cpp ('K') | « test/JsValue.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/WebRequest.cpp
===================================================================
--- a/test/WebRequest.cpp
+++ b/test/WebRequest.cpp
@@ -33,7 +33,7 @@
TEST(WebRequestTest, BadCall)
{
- AdblockPlus::JsEngine jsEngine(0, 0, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, 0, 0);
ASSERT_ANY_THROW(jsEngine.Evaluate("_webRequest.GET()"));
ASSERT_ANY_THROW(jsEngine.Evaluate("_webRequest.GET('', {}, function(){})"));
ASSERT_ANY_THROW(jsEngine.Evaluate("_webRequest.GET({toString: false}, {}, function(){})"));
@@ -45,7 +45,7 @@
TEST(WebRequestTest, TestWebRequest)
{
TestWebRequest webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
jsEngine.Evaluate("_webRequest.GET('http://example.com/', {X: 'Y'}, function(result) {foo = result;} )");
ASSERT_TRUE(jsEngine.Evaluate("this.foo")->IsUndefined());
AdblockPlus::Sleep(200);
@@ -59,7 +59,7 @@
TEST(WebRequestTest, RealWebRequest)
{
AdblockPlus::DefaultWebRequest webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
// This URL should redirect to easylist-downloads.adblockplus.org and we
// should get the actual filter list back.
@@ -78,7 +78,7 @@
TEST(WebRequestTest, RealWebRequest)
{
AdblockPlus::WebRequestWinInet webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
jsEngine.Evaluate("_webRequest.GET('https://easylist.adblockplus.org/easylist.txt', {}, function(result) {foo = result;} )");
do
{
@@ -95,7 +95,7 @@
TEST(WebRequestTest, XMLHttpRequest)
{
AdblockPlus::DefaultWebRequest webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
AdblockPlus::FilterEngine filterEngine(jsEngine);
jsEngine.Evaluate("\
@@ -121,7 +121,7 @@
TEST(WebRequestTest, DummyWebRequest)
{
AdblockPlus::DefaultWebRequest webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
jsEngine.Evaluate("_webRequest.GET('https://easylist.adblockplus.org/easylist.txt', {}, function(result) {foo = result;} )");
do
{
@@ -136,7 +136,7 @@
TEST(WebRequestTest, XMLHttpRequest)
{
AdblockPlus::DefaultWebRequest webRequest;
- AdblockPlus::JsEngine jsEngine(0, &webRequest, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, &webRequest, 0);
AdblockPlus::FilterEngine filterEngine(jsEngine);
jsEngine.Evaluate("\
« src/AppInfoJsObject.cpp ('K') | « test/JsValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld