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

Unified Diff: test/JsEngine.cpp

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Rebase on master. Last changes. Created July 7, 2017, 1:36 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/FilterEngine.cpp ('k') | test/Prefs.cpp » ('j') | 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
@@ -166,22 +166,16 @@
{
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New());
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());
}
TEST(NewJsEngineTest, GlobalPropertyTest)
{
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New());
jsEngine->SetGlobalProperty("foo", jsEngine->NewValue("bar"));
auto foo = jsEngine->Evaluate("foo");
ASSERT_TRUE(foo.IsString());
@@ -208,9 +202,9 @@
// a memory leak than we will run out of memory on 32 bit platform because it
// will allocate 32000 MB which is less than 2GB where it reaches out of
// memory. Even on android where it allocates initially 16MB, the test still
// makes sense.
for (int i = 0; i < 1000; ++i)
{
AdblockPlus::JsEngine::New();
}
-}
+}
« no previous file with comments | « test/FilterEngine.cpp ('k') | test/Prefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld