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

Side by Side Diff: components/autofill/core/browser/autofill_download_manager_unittest.cc

Issue 503883005: Remove implicit conversions from scoped_refptr to T* in components/autofill/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc ('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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/autofill/core/browser/autofill_download_manager.h" 5 #include "components/autofill/core/browser/autofill_download_manager.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // The responses in test are out of order and verify: successful query request, 63 // The responses in test are out of order and verify: successful query request,
64 // successful upload request, failed upload request. 64 // successful upload request, failed upload request.
65 class AutofillDownloadTest : public AutofillDownloadManager::Observer, 65 class AutofillDownloadTest : public AutofillDownloadManager::Observer,
66 public testing::Test { 66 public testing::Test {
67 public: 67 public:
68 AutofillDownloadTest() 68 AutofillDownloadTest()
69 : prefs_(test::PrefServiceForTesting()), 69 : prefs_(test::PrefServiceForTesting()),
70 request_context_(new net::TestURLRequestContextGetter( 70 request_context_(new net::TestURLRequestContextGetter(
71 base::MessageLoopProxy::current())), 71 base::MessageLoopProxy::current())),
72 download_manager_(&driver_, prefs_.get(), this) { 72 download_manager_(&driver_, prefs_.get(), this) {
73 driver_.SetURLRequestContext(request_context_); 73 driver_.SetURLRequestContext(request_context_.get());
74 } 74 }
75 75
76 void LimitCache(size_t cache_size) { 76 void LimitCache(size_t cache_size) {
77 download_manager_.set_max_form_cache_size(cache_size); 77 download_manager_.set_max_form_cache_size(cache_size);
78 } 78 }
79 79
80 // AutofillDownloadManager::Observer implementation. 80 // AutofillDownloadManager::Observer implementation.
81 virtual void OnLoadedServerPredictions( 81 virtual void OnLoadedServerPredictions(
82 const std::string& response_xml) OVERRIDE { 82 const std::string& response_xml) OVERRIDE {
83 ResponseData response; 83 ResponseData response;
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 EXPECT_EQ(static_cast<size_t>(0), responses_.size()); 488 EXPECT_EQ(static_cast<size_t>(0), responses_.size());
489 489
490 fetcher = factory.GetFetcherByID(3); 490 fetcher = factory.GetFetcherByID(3);
491 ASSERT_TRUE(fetcher); 491 ASSERT_TRUE(fetcher);
492 FakeOnURLFetchComplete(fetcher, 200, std::string(responses[0])); 492 FakeOnURLFetchComplete(fetcher, 200, std::string(responses[0]));
493 ASSERT_EQ(static_cast<size_t>(1), responses_.size()); 493 ASSERT_EQ(static_cast<size_t>(1), responses_.size());
494 EXPECT_EQ(responses[0], responses_.front().response); 494 EXPECT_EQ(responses[0], responses_.front().response);
495 } 495 }
496 496
497 } // namespace autofill 497 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698