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

Side by Side Diff: components/captive_portal/captive_portal_detector_unittest.cc

Issue 536623003: Fixups in components/ for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « no previous file | components/feedback/feedback_uploader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/captive_portal/captive_portal_detector.h" 5 #include "components/captive_portal/captive_portal_detector.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 } // namespace 49 } // namespace
50 50
51 class CaptivePortalDetectorTest : public testing::Test, 51 class CaptivePortalDetectorTest : public testing::Test,
52 public CaptivePortalDetectorTestBase { 52 public CaptivePortalDetectorTestBase {
53 public: 53 public:
54 CaptivePortalDetectorTest() {} 54 CaptivePortalDetectorTest() {}
55 virtual ~CaptivePortalDetectorTest() {} 55 virtual ~CaptivePortalDetectorTest() {}
56 56
57 virtual void SetUp() OVERRIDE { 57 virtual void SetUp() OVERRIDE {
58 CHECK(base::MessageLoopProxy::current()); 58 CHECK(base::MessageLoopProxy::current().get());
59 scoped_refptr<net::URLRequestContextGetter> request_context_getter( 59 scoped_refptr<net::URLRequestContextGetter> request_context_getter(
60 new net::TestURLRequestContextGetter( 60 new net::TestURLRequestContextGetter(
61 base::MessageLoopProxy::current())); 61 base::MessageLoopProxy::current()));
62 62
63 detector_.reset(new CaptivePortalDetector(request_context_getter.get())); 63 detector_.reset(new CaptivePortalDetector(request_context_getter.get()));
64 set_detector(detector_.get()); 64 set_detector(detector_.get());
65 } 65 }
66 66
67 virtual void TearDown() OVERRIDE { 67 virtual void TearDown() OVERRIDE {
68 detector_.reset(); 68 detector_.reset();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 TEST_F(CaptivePortalDetectorTest, Cancel) { 206 TEST_F(CaptivePortalDetectorTest, Cancel) {
207 RunCancelTest(); 207 RunCancelTest();
208 CaptivePortalDetector::Results results; 208 CaptivePortalDetector::Results results;
209 results.result = captive_portal::RESULT_INTERNET_CONNECTED; 209 results.result = captive_portal::RESULT_INTERNET_CONNECTED;
210 results.response_code = 204; 210 results.response_code = 204;
211 RunTest(results, net::OK, 204, NULL); 211 RunTest(results, net::OK, 204, NULL);
212 } 212 }
213 213
214 } // namespace captive_portal 214 } // namespace captive_portal
OLDNEW
« no previous file with comments | « no previous file | components/feedback/feedback_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698