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

Unified Diff: test/Prefs.cpp

Issue 29367522: Issue #4688, #3595 - Web request use scheduled threads; unit tests terminate
Patch Set: Created Dec. 14, 2016, 8:38 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/Prefs.cpp
===================================================================
--- a/test/Prefs.cpp
+++ b/test/Prefs.cpp
@@ -17,7 +17,6 @@
#include <sstream>
-#include "../src/Thread.h"
Eric 2016/12/14 20:53:55 Don't know how this snuck through previous compila
#include "BaseJsTest.h"
namespace
@@ -65,16 +64,13 @@
class PrefsTest : public ::testing::Test
{
protected:
- TestFileSystem* fileSystem;
- AdblockPlus::FileSystemPtr fileSystemPtr;
+ std::shared_ptr<TestFileSystem> fileSystem;
AdblockPlus::JsEnginePtr jsEngine;
FilterEnginePtr filterEngine;
void SetUp()
{
- fileSystem = new TestFileSystem();
- fileSystemPtr.reset(fileSystem);
-
+ fileSystem = std::make_shared<TestFileSystem>();
Reset();
}
@@ -83,7 +79,7 @@
{
jsEngine = CreateJsEngine();
jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new LazyLogSystem));
- jsEngine->SetFileSystem(fileSystemPtr);
+ jsEngine->SetFileSystem(fileSystem);
jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new LazyWebRequest));
filterEngine.reset(
« test/BaseJsTest.h ('K') | « test/FilterEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld