Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
902 { | 902 { |
903 // no subscription (because of preconfigured prefs.json and patterns.ini ), | 903 // no subscription (because of preconfigured prefs.json and patterns.ini ), |
904 // though it should be enabled by default in a non-test environment, it' s tested in | 904 // though it should be enabled by default in a non-test environment, it' s tested in |
905 // corresponding tests. | 905 // corresponding tests. |
906 const auto subscriptions = filterEngine->GetListedSubscriptions(); | 906 const auto subscriptions = filterEngine->GetListedSubscriptions(); |
907 EXPECT_EQ(0u, subscriptions.size()); // no any subscription including AA | 907 EXPECT_EQ(0u, subscriptions.size()); // no any subscription including AA |
908 EXPECT_FALSE(filterEngine->IsAAEnabled()); | 908 EXPECT_FALSE(filterEngine->IsAAEnabled()); |
909 } | 909 } |
910 if (otherSubscriptionsNumber == 1u) | 910 if (otherSubscriptionsNumber == 1u) |
911 { | 911 { |
912 auto subscruption = filterEngine->GetSubscription(kOtherSubscriptionUrl) ; | 912 auto subscription = filterEngine->GetSubscription(kOtherSubscriptionUrl) ; |
hub
2017/04/05 14:52:47
'nit: I didn't see that one. There is a typo. It i
sergei
2017/04/05 16:54:45
Done. Good catch.
| |
913 ASSERT_TRUE(subscruption); | 913 ASSERT_TRUE(subscription); |
914 subscruption->AddToList(); | 914 subscription->AddToList(); |
915 const auto subscriptions = filterEngine->GetListedSubscriptions(); | 915 const auto subscriptions = filterEngine->GetListedSubscriptions(); |
916 ASSERT_EQ(1u, subscriptions.size()); | 916 ASSERT_EQ(1u, subscriptions.size()); |
917 EXPECT_FALSE(subscriptions[0]->IsAA()); | 917 EXPECT_FALSE(subscriptions[0]->IsAA()); |
918 EXPECT_EQ(kOtherSubscriptionUrl, subscriptions[0]->GetProperty("url")->A sString()); | 918 EXPECT_EQ(kOtherSubscriptionUrl, subscriptions[0]->GetProperty("url")->A sString()); |
919 } | 919 } |
920 if (isAASatusPresent(aaStatus)) | 920 if (isAASatusPresent(aaStatus)) |
921 { | 921 { |
922 filterEngine->SetAAEnabled(true); // add AA by enabling it | 922 filterEngine->SetAAEnabled(true); // add AA by enabling it |
923 if (aaStatus == AAStatus::disabled_present) | 923 if (aaStatus == AAStatus::disabled_present) |
924 { | 924 { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 } |
LEFT | RIGHT |