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

Side by Side Diff: components/dom_distiller/core/distiller_url_fetcher_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "components/dom_distiller/core/distiller_url_fetcher.h" 8 #include "components/dom_distiller/core/distiller_url_fetcher.h"
9 #include "net/http/http_status_code.h" 9 #include "net/http/http_status_code.h"
10 #include "net/url_request/test_url_fetcher_factory.h" 10 #include "net/url_request/test_url_fetcher_factory.h"
(...skipping 10 matching lines...) Expand all
21 21
22 22
23 class DistillerURLFetcherTest : public testing::Test { 23 class DistillerURLFetcherTest : public testing::Test {
24 public: 24 public:
25 void FetcherCallback(const std::string& response) { 25 void FetcherCallback(const std::string& response) {
26 response_ = response; 26 response_ = response;
27 } 27 }
28 28
29 protected: 29 protected:
30 // testing::Test implementation: 30 // testing::Test implementation:
31 virtual void SetUp() override { 31 void SetUp() override {
32 url_fetcher_.reset(new dom_distiller::DistillerURLFetcher(NULL)); 32 url_fetcher_.reset(new dom_distiller::DistillerURLFetcher(NULL));
33 factory_.reset(new net::FakeURLFetcherFactory(NULL)); 33 factory_.reset(new net::FakeURLFetcherFactory(NULL));
34 factory_->SetFakeResponse( 34 factory_->SetFakeResponse(
35 GURL(kTestPageA), 35 GURL(kTestPageA),
36 std::string(kTestPageAResponse, sizeof(kTestPageAResponse)), 36 std::string(kTestPageAResponse, sizeof(kTestPageAResponse)),
37 net::HTTP_OK, 37 net::HTTP_OK,
38 net::URLRequestStatus::SUCCESS); 38 net::URLRequestStatus::SUCCESS);
39 factory_->SetFakeResponse( 39 factory_->SetFakeResponse(
40 GURL(kTestPageB), 40 GURL(kTestPageB),
41 std::string(kTestPageBResponse, sizeof(kTestPageBResponse)), 41 std::string(kTestPageBResponse, sizeof(kTestPageBResponse)),
(...skipping 19 matching lines...) Expand all
61 61
62 TEST_F(DistillerURLFetcherTest, PopulateProto) { 62 TEST_F(DistillerURLFetcherTest, PopulateProto) {
63 Fetch(kTestPageA, 63 Fetch(kTestPageA,
64 std::string(kTestPageAResponse, sizeof(kTestPageAResponse))); 64 std::string(kTestPageAResponse, sizeof(kTestPageAResponse)));
65 } 65 }
66 66
67 TEST_F(DistillerURLFetcherTest, PopulateProtoFailedFetch) { 67 TEST_F(DistillerURLFetcherTest, PopulateProtoFailedFetch) {
68 // Expect the callback to contain an empty string for this URL. 68 // Expect the callback to contain an empty string for this URL.
69 Fetch(kTestPageB, std::string(std::string(), 0)); 69 Fetch(kTestPageB, std::string(std::string(), 0));
70 } 70 }
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distiller_unittest.cc ('k') | components/dom_distiller/core/dom_distiller_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698