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

Unified Diff: test/FilterEngine.cpp

Issue 10291009: Disable side-effects in filter engine tests (Closed)
Patch Set: Fixed the other TODO in tests Created April 26, 2013, 12:44 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
« no previous file with comments | « test/BaseJsTest.h ('k') | test/WebRequest.cpp » ('j') | test/WebRequest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/FilterEngine.cpp
===================================================================
--- a/test/FilterEngine.cpp
+++ b/test/FilterEngine.cpp
@@ -7,19 +7,19 @@ namespace
class FilterEngineTest : public BaseJsTest
{
protected:
FilterEnginePtr filterEngine;
void SetUp()
{
BaseJsTest::SetUp();
- // TODO: Don't use the default ErrorCallback/WebRequest
+ jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem));
+ jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new LazyWebRequest));
jsEngine->SetErrorCallback(AdblockPlus::ErrorCallbackPtr(new AdblockPlus::DefaultErrorCallback));
- jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new AdblockPlus::DefaultWebRequest));
filterEngine = FilterEnginePtr(new AdblockPlus::FilterEngine(jsEngine));
}
};
}
TEST_F(FilterEngineTest, FilterCreation)
{
AdblockPlus::FilterPtr filter1 = filterEngine->GetFilter("foo");
« no previous file with comments | « test/BaseJsTest.h ('k') | test/WebRequest.cpp » ('j') | test/WebRequest.cpp » ('J')

Powered by Google App Engine
This is Rietveld