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

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: rebase again Created 7 years, 6 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 MOCK_METHOD3(OnJobDone, void(DeviceManagementStatus, int, 160 MOCK_METHOD3(OnJobDone, void(DeviceManagementStatus, int,
161 const em::DeviceManagementResponse&)); 161 const em::DeviceManagementResponse&));
162 162
163 MOCK_METHOD1(OnJobRetry, void(DeviceManagementRequestJob*)); 163 MOCK_METHOD1(OnJobRetry, void(DeviceManagementRequestJob*));
164 164
165 net::TestURLFetcherFactory factory_; 165 net::TestURLFetcherFactory factory_;
166 scoped_ptr<DeviceManagementService> service_; 166 scoped_ptr<DeviceManagementService> service_;
167 167
168 private: 168 private:
169 MessageLoopForUI loop_; 169 base::MessageLoopForUI loop_;
170 content::TestBrowserThread ui_thread_; 170 content::TestBrowserThread ui_thread_;
171 content::TestBrowserThread io_thread_; 171 content::TestBrowserThread io_thread_;
172 }; 172 };
173 173
174 struct FailedRequestParams { 174 struct FailedRequestParams {
175 FailedRequestParams(DeviceManagementStatus expected_status, 175 FailedRequestParams(DeviceManagementStatus expected_status,
176 net::URLRequestStatus::Status request_status, 176 net::URLRequestStatus::Status request_status,
177 int http_status, 177 int http_status,
178 const std::string& response) 178 const std::string& response)
179 : expected_status_(expected_status), 179 : expected_status_(expected_status),
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 EXPECT_CALL(*this, OnJobDone(DM_STATUS_REQUEST_FAILED, _, _)); 691 EXPECT_CALL(*this, OnJobDone(DM_STATUS_REQUEST_FAILED, _, _));
692 EXPECT_CALL(*this, OnJobRetry(_)).Times(0); 692 EXPECT_CALL(*this, OnJobRetry(_)).Times(0);
693 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::FAILED, 693 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::FAILED,
694 net::ERR_NETWORK_CHANGED)); 694 net::ERR_NETWORK_CHANGED));
695 fetcher->set_url(GURL(kServiceUrl)); 695 fetcher->set_url(GURL(kServiceUrl));
696 fetcher->delegate()->OnURLFetchComplete(fetcher); 696 fetcher->delegate()->OnURLFetchComplete(fetcher);
697 Mock::VerifyAndClearExpectations(this); 697 Mock::VerifyAndClearExpectations(this);
698 } 698 }
699 699
700 } // namespace policy 700 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698