Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/UpdateCheck.cpp

Issue 29428624: Issue 5180 - stop using of WebRequestPtr in tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 3, 2017, 2:07 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/Prefs.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « test/Prefs.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld