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

Side by Side Diff: google_apis/gaia/oauth2_token_service_unittest.cc

Issue 802413003: Standardize usage of virtual/override/final specifiers in google_apis/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "google_apis/gaia/gaia_constants.h" 9 #include "google_apis/gaia/gaia_constants.h"
10 #include "google_apis/gaia/google_service_auth_error.h" 10 #include "google_apis/gaia/google_service_auth_error.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 std::string refresh_token(it->second); 85 std::string refresh_token(it->second);
86 return new OAuth2AccessTokenFetcherImpl(consumer, getter, refresh_token); 86 return new OAuth2AccessTokenFetcherImpl(consumer, getter, refresh_token);
87 }; 87 };
88 88
89 std::map<std::string, std::string> refresh_tokens_; 89 std::map<std::string, std::string> refresh_tokens_;
90 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_; 90 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;
91 }; 91 };
92 92
93 class OAuth2TokenServiceTest : public testing::Test { 93 class OAuth2TokenServiceTest : public testing::Test {
94 public: 94 public:
95 virtual void SetUp() override { 95 void SetUp() override {
96 oauth2_service_.reset( 96 oauth2_service_.reset(
97 new TestOAuth2TokenService(new net::TestURLRequestContextGetter( 97 new TestOAuth2TokenService(new net::TestURLRequestContextGetter(
98 message_loop_.message_loop_proxy()))); 98 message_loop_.message_loop_proxy())));
99 account_id_ = "test_user@gmail.com"; 99 account_id_ = "test_user@gmail.com";
100 } 100 }
101 101
102 virtual void TearDown() override { 102 void TearDown() override {
103 // Makes sure that all the clean up tasks are run. 103 // Makes sure that all the clean up tasks are run.
104 base::RunLoop().RunUntilIdle(); 104 base::RunLoop().RunUntilIdle();
105 } 105 }
106 106
107 protected: 107 protected:
108 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop. 108 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop.
109 net::TestURLFetcherFactory factory_; 109 net::TestURLFetcherFactory factory_;
110 scoped_ptr<TestOAuth2TokenService> oauth2_service_; 110 scoped_ptr<TestOAuth2TokenService> oauth2_service_;
111 std::string account_id_; 111 std::string account_id_;
112 TestingOAuth2TokenServiceConsumer consumer_; 112 TestingOAuth2TokenServiceConsumer consumer_;
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } else if (i < j) { 641 } else if (i < j) {
642 EXPECT_TRUE(params[i] < params[j]) << " i=" << i << ", j=" << j; 642 EXPECT_TRUE(params[i] < params[j]) << " i=" << i << ", j=" << j;
643 EXPECT_FALSE(params[j] < params[i]) << " i=" << i << ", j=" << j; 643 EXPECT_FALSE(params[j] < params[i]) << " i=" << i << ", j=" << j;
644 } else { 644 } else {
645 EXPECT_TRUE(params[j] < params[i]) << " i=" << i << ", j=" << j; 645 EXPECT_TRUE(params[j] < params[i]) << " i=" << i << ", j=" << j;
646 EXPECT_FALSE(params[i] < params[j]) << " i=" << i << ", j=" << j; 646 EXPECT_FALSE(params[i] < params[j]) << " i=" << i << ", j=" << j;
647 } 647 }
648 } 648 }
649 } 649 }
650 } 650 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request_unittest.cc ('k') | google_apis/gaia/ubertoken_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698