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

Unified Diff: test/ConsoleJsObject.cpp

Issue 10213003: Make JsEngine::Evaluate() return a wrapper for v8::Value to accessdifferent variable types easily (Closed)
Patch Set: Added tests, resolved type conversion ambiguities, implemented some missing API calls Created April 15, 2013, 6:23 a.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/ConsoleJsObject.cpp
===================================================================
--- a/test/ConsoleJsObject.cpp
+++ b/test/ConsoleJsObject.cpp
@@ -18,17 +18,17 @@ TEST(ConsoleJsObjectTest, ErrorInvokesEr
AdblockPlus::JsEngine jsEngine(0, 0, &errorCallback);
jsEngine.Evaluate("console.error('foo')");
ASSERT_EQ("foo", errorCallback.lastMessage);
}
TEST(ConsoleJsObjectTest, ErrorWithMultipleArguments)
{
MockErrorCallback errorCallback;
- AdblockPlus::JsEngine jsEngine(0, &errorCallback);
+ AdblockPlus::JsEngine jsEngine(0, 0, &errorCallback);
jsEngine.Evaluate("console.error('foo', 'bar')");
ASSERT_EQ("foobar", errorCallback.lastMessage);
}
TEST(ConsoleJsObjectTest, TraceDoesNothing)
{
AdblockPlus::JsEngine jsEngine(0, 0, 0);
jsEngine.Evaluate("console.trace()");
« src/FilterEngine.cpp ('K') | « src/JsValue.cpp ('k') | test/FilterEngineStubs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld