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

Side by Side Diff: google_apis/gcm/engine/unregistration_request_unittest.cc

Issue 1184713004: google_apis: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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
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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_tokenizer.h" 10 #include "base/strings/string_tokenizer.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 base::MessageLoop message_loop_; 78 base::MessageLoop message_loop_;
79 net::TestURLFetcherFactory url_fetcher_factory_; 79 net::TestURLFetcherFactory url_fetcher_factory_;
80 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_; 80 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
81 FakeGCMStatsRecorder recorder_; 81 FakeGCMStatsRecorder recorder_;
82 }; 82 };
83 83
84 UnregistrationRequestTest::UnregistrationRequestTest() 84 UnregistrationRequestTest::UnregistrationRequestTest()
85 : callback_called_(false), 85 : callback_called_(false),
86 status_(UnregistrationRequest::UNREGISTRATION_STATUS_COUNT), 86 status_(UnregistrationRequest::UNREGISTRATION_STATUS_COUNT),
87 url_request_context_getter_(new net::TestURLRequestContextGetter( 87 url_request_context_getter_(new net::TestURLRequestContextGetter(
88 message_loop_.message_loop_proxy())) {} 88 message_loop_.task_runner())) {}
89 89
90 UnregistrationRequestTest::~UnregistrationRequestTest() {} 90 UnregistrationRequestTest::~UnregistrationRequestTest() {}
91 91
92 void UnregistrationRequestTest::UnregistrationCallback( 92 void UnregistrationRequestTest::UnregistrationCallback(
93 UnregistrationRequest::Status status) { 93 UnregistrationRequest::Status status) {
94 callback_called_ = true; 94 callback_called_ = true;
95 status_ = status; 95 status_ = status;
96 } 96 }
97 97
98 void UnregistrationRequestTest::SetResponseStatusAndString( 98 void UnregistrationRequestTest::SetResponseStatusAndString(
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 request_->Start(); 418 request_->Start();
419 419
420 SetResponseStatusAndString(net::HTTP_UNAUTHORIZED, ""); 420 SetResponseStatusAndString(net::HTTP_UNAUTHORIZED, "");
421 CompleteFetch(); 421 CompleteFetch();
422 422
423 EXPECT_TRUE(callback_called_); 423 EXPECT_TRUE(callback_called_);
424 EXPECT_EQ(UnregistrationRequest::HTTP_NOT_OK, status_); 424 EXPECT_EQ(UnregistrationRequest::HTTP_NOT_OK, status_);
425 } 425 }
426 426
427 } // namespace gcm 427 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/registration_request_unittest.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698