Index: test/JsEngine.cpp |
=================================================================== |
--- a/test/JsEngine.cpp |
+++ b/test/JsEngine.cpp |
@@ -47,7 +47,8 @@ |
{ |
ThrowingFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
- AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), &fileReader, 0, |
+ &errorCallback); |
const std::string source = "function hello() { return 'Hello'; }"; |
jsEngine.Evaluate(source); |
const std::string result = jsEngine.Evaluate("hello()"); |
@@ -58,7 +59,8 @@ |
{ |
StubFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
- AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), &fileReader, 0, |
+ &errorCallback); |
jsEngine.Load("hello.js"); |
const std::string result = jsEngine.Evaluate("hello()"); |
ASSERT_EQ("Hello", result); |
@@ -68,7 +70,8 @@ |
{ |
BadFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
- AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), &fileReader, 0, |
+ &errorCallback); |
ASSERT_ANY_THROW(jsEngine.Load("hello.js")); |
} |
@@ -76,7 +79,8 @@ |
{ |
ThrowingFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
- AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), &fileReader, 0, |
+ &errorCallback); |
ASSERT_THROW(jsEngine.Evaluate("doesnotexist()"), AdblockPlus::JsError); |
} |
@@ -84,6 +88,7 @@ |
{ |
ThrowingFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
- AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), &fileReader, 0, |
+ &errorCallback); |
ASSERT_THROW(jsEngine.Evaluate("'foo'bar'"), AdblockPlus::JsError); |
} |