| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 FilterEnginePtr filterEngine; | 50 FilterEnginePtr filterEngine; |
| 51 | 51 |
| 52 void SetUp() | 52 void SetUp() |
| 53 { | 53 { |
| 54 BaseJsTest::SetUp(); | 54 BaseJsTest::SetUp(); |
| 55 jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new FileSystem)); | 55 jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new FileSystem)); |
| 56 jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new LazyWebRequest)); | 56 jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new LazyWebRequest)); |
| 57 jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new LogSystem)); | 57 jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new LogSystem)); |
| 58 filterEngine = AdblockPlus::FilterEngine::Create(jsEngine); | 58 filterEngine = AdblockPlus::FilterEngine::Create(jsEngine); |
| 59 } | 59 } |
| 60 void TearDown() override | |
|
hub
2017/04/28 13:07:23
I would add a comment here to point at the actual
sergei
2017/04/28 13:14:33
Agree, I thought that one will later trace it usin
| |
| 61 { | |
| 62 std::this_thread::sleep_for(std::chrono::milliseconds(100)); | |
| 63 } | |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem> FilterEngineTest; | 66 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem> FilterEngineTest; |
| 63 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin eTestNoData; | 67 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin eTestNoData; |
| 64 | 68 |
| 65 class UpdaterTest : public ::testing::Test | 69 class UpdaterTest : public ::testing::Test |
| 66 { | 70 { |
| 67 protected: | 71 protected: |
| 68 class MockWebRequest : public AdblockPlus::WebRequest | 72 class MockWebRequest : public AdblockPlus::WebRequest |
| 69 { | 73 { |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1077 filterEngine->SetAllowedConnectionType(&testConnection); | 1081 filterEngine->SetAllowedConnectionType(&testConnection); |
| 1078 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); | 1082 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); |
| 1079 EXPECT_EQ("synchronize_ok", subscription.GetProperty("downloadStatus").AsStr ing()); | 1083 EXPECT_EQ("synchronize_ok", subscription.GetProperty("downloadStatus").AsStr ing()); |
| 1080 EXPECT_EQ(1u, subscription.GetProperty("filters").AsList().size()); | 1084 EXPECT_EQ(1u, subscription.GetProperty("filters").AsList().size()); |
| 1081 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); | 1085 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); |
| 1082 ASSERT_EQ(1u, capturedConnectionTypes.size()); | 1086 ASSERT_EQ(1u, capturedConnectionTypes.size()); |
| 1083 EXPECT_TRUE(capturedConnectionTypes[0].first); | 1087 EXPECT_TRUE(capturedConnectionTypes[0].first); |
| 1084 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); | 1088 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); |
| 1085 } | 1089 } |
| 1086 } | 1090 } |
| OLD | NEW |