| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 previousRequestUrl = url; | 44 previousRequestUrl = url; |
| 45 return response; | 45 return response; |
| 46 } | 46 } |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 class UpdateCheckTest : public ::testing::Test | 49 class UpdateCheckTest : public ::testing::Test |
| 50 { | 50 { |
| 51 protected: | 51 protected: |
| 52 AdblockPlus::AppInfo appInfo; | 52 AdblockPlus::AppInfo appInfo; |
| 53 TestWebRequest* webRequest; | 53 TestWebRequest* webRequest; |
| 54 AdblockPlus::WebRequestPtr webRequestPtr; | 54 WebRequestSharedPtr webRequestPtr; |
| 55 AdblockPlus::JsEnginePtr jsEngine; | 55 AdblockPlus::JsEnginePtr jsEngine; |
| 56 FilterEnginePtr filterEngine; | 56 FilterEnginePtr filterEngine; |
| 57 | 57 |
| 58 bool eventCallbackCalled; | 58 bool eventCallbackCalled; |
| 59 AdblockPlus::JsValueList eventCallbackParams; | 59 AdblockPlus::JsValueList eventCallbackParams; |
| 60 bool updateCallbackCalled; | 60 bool updateCallbackCalled; |
| 61 std::string updateError; | 61 std::string updateError; |
| 62 | 62 |
| 63 void SetUp() | 63 void SetUp() |
| 64 { | 64 { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 Reset(); | 256 Reset(); |
| 257 ForceUpdateCheck(); | 257 ForceUpdateCheck(); |
| 258 | 258 |
| 259 AdblockPlus::Sleep(100); | 259 AdblockPlus::Sleep(100); |
| 260 | 260 |
| 261 ASSERT_FALSE(eventCallbackCalled); | 261 ASSERT_FALSE(eventCallbackCalled); |
| 262 ASSERT_TRUE(updateCallbackCalled); | 262 ASSERT_TRUE(updateCallbackCalled); |
| 263 ASSERT_FALSE(updateError.empty()); | 263 ASSERT_FALSE(updateError.empty()); |
| 264 } | 264 } |
| OLD | NEW |