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

Side by Side Diff: test/BaseJsTest.h

Issue 29435650: Issue 5182, 4688 - improve IsSubscriptionDowloadAllowedCallback and corresponding tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 10, 2017, 4:55 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
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 return result; 186 return result;
187 } 187 }
188 188
189 std::string Resolve(const std::string& path) const 189 std::string Resolve(const std::string& path) const
190 { 190 {
191 return path; 191 return path;
192 } 192 }
193 }; 193 };
194 194
195 class LazyWebRequest : public AdblockPlus::WebRequest
196 {
197 public:
198 AdblockPlus::ServerResponse GET(const std::string& url, const AdblockPlus::Hea derList& requestHeaders) const
199 {
200 while (true)
201 AdblockPlus::Sleep(100000);
202 return AdblockPlus::ServerResponse();
203 }
204 };
205
206 class NoopWebRequest : public AdblockPlus::IWebRequest 195 class NoopWebRequest : public AdblockPlus::IWebRequest
207 { 196 {
208 public: 197 public:
209 void GET(const std::string& url, const AdblockPlus::HeaderList& requestHeaders , const GetCallback& callback) override 198 void GET(const std::string& url, const AdblockPlus::HeaderList& requestHeaders , const GetCallback& callback) override
210 { 199 {
211 } 200 }
212 }; 201 };
213 202
214 struct DelayedWebRequestTask 203 struct DelayedWebRequestTask
215 { 204 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 protected: 244 protected:
256 AdblockPlus::JsEnginePtr jsEngine; 245 AdblockPlus::JsEnginePtr jsEngine;
257 246
258 virtual void SetUp() 247 virtual void SetUp()
259 { 248 {
260 jsEngine = CreateJsEngine(); 249 jsEngine = CreateJsEngine();
261 } 250 }
262 }; 251 };
263 252
264 #endif 253 #endif
OLDNEW
« no previous file with comments | « src/FilterEngine.cpp ('k') | test/FilterEngine.cpp » ('j') | test/FilterEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld