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(); |
} |
-} |
+} |