| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem>
FilterEngineTest; | 62 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem>
FilterEngineTest; |
| 63 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin
eTestNoData; | 63 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin
eTestNoData; |
| 64 | 64 |
| 65 struct MockFilterChangeCallback | 65 struct MockFilterChangeCallback |
| 66 { | 66 { |
| 67 MockFilterChangeCallback(int& timesCalled) : timesCalled(timesCalled) {} | 67 MockFilterChangeCallback(int& timesCalled) : timesCalled(timesCalled) {} |
| 68 | 68 |
| 69 void operator()(const std::string&, const AdblockPlus::JsValuePtr) | 69 void operator()(const std::string&, const AdblockPlus::JsValue&) |
| 70 { | 70 { |
| 71 timesCalled++; | 71 timesCalled++; |
| 72 } | 72 } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 int& timesCalled; | 75 int& timesCalled; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class UpdaterTest : public ::testing::Test | 78 class UpdaterTest : public ::testing::Test |
| 79 { | 79 { |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 std::string testConnection = "test connection"; | 1085 std::string testConnection = "test connection"; |
| 1086 filterEngine->SetAllowedConnectionType(&testConnection); | 1086 filterEngine->SetAllowedConnectionType(&testConnection); |
| 1087 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); | 1087 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); |
| 1088 EXPECT_EQ("synchronize_ok", subscription->GetProperty("downloadStatus")->AsS
tring()); | 1088 EXPECT_EQ("synchronize_ok", subscription->GetProperty("downloadStatus")->AsS
tring()); |
| 1089 EXPECT_EQ(1u, subscription->GetProperty("filters")->AsList().size()); | 1089 EXPECT_EQ(1u, subscription->GetProperty("filters")->AsList().size()); |
| 1090 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); | 1090 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); |
| 1091 ASSERT_EQ(1u, capturedConnectionTypes.size()); | 1091 ASSERT_EQ(1u, capturedConnectionTypes.size()); |
| 1092 EXPECT_TRUE(capturedConnectionTypes[0].first); | 1092 EXPECT_TRUE(capturedConnectionTypes[0].first); |
| 1093 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); | 1093 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); |
| 1094 } | 1094 } |
| 1095 } | 1095 } |
| OLD | NEW |