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

Unified Diff: test/JsEngine.cpp

Issue 10524054: Rename ErrorCallback into LogSystem, provide a proper console API (Closed)
Patch Set: Created May 10, 2013, 2:01 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
« include/AdblockPlus/LogSystem.h ('K') | « test/FilterEngine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/JsEngine.cpp
===================================================================
--- a/test/JsEngine.cpp
+++ b/test/JsEngine.cpp
@@ -62,21 +62,21 @@ TEST_F(JsEngineTest, ValueCreation)
ASSERT_TRUE(value->IsObject());
ASSERT_EQ(0u, value->GetOwnPropertyNames().size());
}
TEST(NewJsEngineTest, CallbackGetSet)
{
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New());
- ASSERT_TRUE(jsEngine->GetErrorCallback());
- ASSERT_ANY_THROW(jsEngine->SetErrorCallback(AdblockPlus::ErrorCallbackPtr()));
- AdblockPlus::ErrorCallbackPtr errorCallback(new AdblockPlus::DefaultErrorCallback());
- jsEngine->SetErrorCallback(errorCallback);
- ASSERT_EQ(errorCallback, jsEngine->GetErrorCallback());
+ ASSERT_TRUE(jsEngine->GetLogSystem());
+ ASSERT_ANY_THROW(jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr()));
+ AdblockPlus::LogSystemPtr logSystem(new AdblockPlus::DefaultLogSystem());
+ jsEngine->SetLogSystem(logSystem);
+ ASSERT_EQ(logSystem, jsEngine->GetLogSystem());
ASSERT_TRUE(jsEngine->GetFileSystem());
ASSERT_ANY_THROW(jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr()));
AdblockPlus::FileSystemPtr fileSystem(new AdblockPlus::DefaultFileSystem());
jsEngine->SetFileSystem(fileSystem);
ASSERT_EQ(fileSystem, jsEngine->GetFileSystem());
ASSERT_TRUE(jsEngine->GetWebRequest());
« include/AdblockPlus/LogSystem.h ('K') | « test/FilterEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld