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: Rebased. Corrected most of the review issues. Created July 4, 2017, 7:57 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
« src/JsEngine.cpp ('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
@@ -167,21 +167,17 @@
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());
+ ASSERT_TRUE(jsEngine->GetAsyncFileSystem());
sergei 2017/07/05 10:03:21 Since it's a private functionality, I think we can
hub 2017/07/06 12:21:52 Done.
}
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 +204,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();
}
-}
+}
« src/JsEngine.cpp ('K') | « test/FilterEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld