Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: components/offline_pages/core/prefetch/prefetch_request_test_base.h

Issue 2873383004: [Offline Prefetch] Send GeneratePageBundleRequest to the server (Closed)
Patch Set: Address feedback + fix trybots Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_REQUEST_FETCHER_TEST_BAS E_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_REQUEST_FETCHER_TEST_BAS E_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h"
10 #include "net/url_request/test_url_fetcher_factory.h"
11 #include "net/url_request/url_request_test_util.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13
14 namespace offline_pages {
15
16 class PrefetchRequestTestBase : public testing::Test {
dewittj 2017/05/11 21:51:48 nit: Class comment please
jianli 2017/05/11 23:07:28 Done.
17 public:
18 PrefetchRequestTestBase();
19 ~PrefetchRequestTestBase() override;
20
21 void RespondWithNetError(int net_error);
22 void RespondWithHttpError(int http_error);
23 void RespondWithData(const std::string& data);
24
25 net::URLRequestContextGetter* request_context() const {
26 return request_context_.get();
27 }
28
29 private:
30 base::MessageLoop message_loop_;
dewittj 2017/05/11 21:51:48 is this used?
jianli 2017/05/11 23:07:28 This is needed in order to create a TaskRunner. Sw
31 net::TestURLFetcherFactory url_fetcher_factory_;
32 scoped_refptr<net::TestURLRequestContextGetter> request_context_;
33 };
34
35 } // namespace offline_pages
36
37 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_REQUEST_FETCHER_TEST_ BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698