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

Unified Diff: test/ConsoleJsObject.cpp

Issue 10252009: Support multiple arguments properly in console.error (Closed)
Patch Set: Created April 11, 2013, 10:59 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
« no previous file with comments | « src/ConsoleJsObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/ConsoleJsObject.cpp
===================================================================
--- a/test/ConsoleJsObject.cpp
+++ b/test/ConsoleJsObject.cpp
@@ -20,6 +20,14 @@
ASSERT_EQ("foo", errorCallback.lastMessage);
}
+TEST(ConsoleJsObjectTest, ErrorWithMultipleArguments)
+{
+ MockErrorCallback errorCallback;
+ AdblockPlus::JsEngine jsEngine(0, &errorCallback);
+ jsEngine.Evaluate("console.error('foo', 'bar')");
+ ASSERT_EQ("foobar", errorCallback.lastMessage);
+}
+
TEST(ConsoleJsObjectTest, TraceDoesNothing)
{
AdblockPlus::JsEngine jsEngine(0, 0);
« no previous file with comments | « src/ConsoleJsObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld