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

Unified Diff: test/GlobalJsObject.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
Index: test/GlobalJsObject.cpp
===================================================================
--- a/test/GlobalJsObject.cpp
+++ b/test/GlobalJsObject.cpp
@@ -5,7 +5,7 @@
TEST(GlobalJsObjectTest, SetTimeout)
{
- AdblockPlus::JsEngine jsEngine(0, 0, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, 0, 0);
jsEngine.Evaluate("setTimeout(function() {foo = 'bar';}, 100)");
ASSERT_TRUE(jsEngine.Evaluate("this.foo")->IsUndefined());
AdblockPlus::Sleep(200);
@@ -14,7 +14,7 @@
TEST(GlobalJsObjectTest, SetTimeoutWithArgs)
{
- AdblockPlus::JsEngine jsEngine(0, 0, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, 0, 0);
jsEngine.Evaluate("setTimeout(function(s) {foo = s;}, 100, 'foobar')");
ASSERT_TRUE(jsEngine.Evaluate("this.foo")->IsUndefined());
AdblockPlus::Sleep(200);
@@ -23,14 +23,14 @@
TEST(GlobalJsObjectTest, SetTimeoutWithInvalidArgs)
{
- AdblockPlus::JsEngine jsEngine(0, 0, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, 0, 0);
ASSERT_ANY_THROW(jsEngine.Evaluate("setTimeout()"));
ASSERT_ANY_THROW(jsEngine.Evaluate("setTimeout('', 1)"));
}
TEST(GlobalJsObjectTest, SetMultipleTimeouts)
{
- AdblockPlus::JsEngine jsEngine(0, 0, 0);
+ AdblockPlus::JsEngine jsEngine(AdblockPlus::AppInfo(), 0, 0, 0);
jsEngine.Evaluate("foo = []");
jsEngine.Evaluate("setTimeout(function(s) {foo.push('1');}, 100)");
jsEngine.Evaluate("setTimeout(function(s) {foo.push('2');}, 150)");
« src/AppInfoJsObject.cpp ('K') | « test/FilterEngineStubs.cpp ('k') | test/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld