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

Side by Side Diff: chrome/browser/policy/cloud/device_management_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 <ostream> 5 #include <ostream>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 MOCK_METHOD2(OnJobDone, void(DeviceManagementStatus, 145 MOCK_METHOD2(OnJobDone, void(DeviceManagementStatus,
146 const em::DeviceManagementResponse&)); 146 const em::DeviceManagementResponse&));
147 147
148 MOCK_METHOD1(OnJobRetry, void(DeviceManagementRequestJob*)); 148 MOCK_METHOD1(OnJobRetry, void(DeviceManagementRequestJob*));
149 149
150 net::TestURLFetcherFactory factory_; 150 net::TestURLFetcherFactory factory_;
151 scoped_ptr<DeviceManagementService> service_; 151 scoped_ptr<DeviceManagementService> service_;
152 152
153 private: 153 private:
154 MessageLoopForUI loop_; 154 base::MessageLoopForUI loop_;
155 content::TestBrowserThread ui_thread_; 155 content::TestBrowserThread ui_thread_;
156 content::TestBrowserThread io_thread_; 156 content::TestBrowserThread io_thread_;
157 }; 157 };
158 158
159 struct FailedRequestParams { 159 struct FailedRequestParams {
160 FailedRequestParams(DeviceManagementStatus expected_status, 160 FailedRequestParams(DeviceManagementStatus expected_status,
161 net::URLRequestStatus::Status request_status, 161 net::URLRequestStatus::Status request_status,
162 int http_status, 162 int http_status,
163 const std::string& response) 163 const std::string& response)
164 : expected_status_(expected_status), 164 : expected_status_(expected_status),
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 EXPECT_CALL(*this, OnJobDone(DM_STATUS_REQUEST_FAILED, _)); 625 EXPECT_CALL(*this, OnJobDone(DM_STATUS_REQUEST_FAILED, _));
626 EXPECT_CALL(*this, OnJobRetry(_)).Times(0); 626 EXPECT_CALL(*this, OnJobRetry(_)).Times(0);
627 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::FAILED, 627 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::FAILED,
628 net::ERR_NETWORK_CHANGED)); 628 net::ERR_NETWORK_CHANGED));
629 fetcher->set_url(GURL(kServiceUrl)); 629 fetcher->set_url(GURL(kServiceUrl));
630 fetcher->delegate()->OnURLFetchComplete(fetcher); 630 fetcher->delegate()->OnURLFetchComplete(fetcher);
631 Mock::VerifyAndClearExpectations(this); 631 Mock::VerifyAndClearExpectations(this);
632 } 632 }
633 633
634 } // namespace policy 634 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698