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

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

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « google_apis/gaia/oauth2_mint_token_flow.cc ('k') | gpu/config/gpu_dx_diagnostics_win.cc » ('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 // A complete set of unit tests for OAuth2MintTokenFlow. 5 // A complete set of unit tests for OAuth2MintTokenFlow.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 std::vector<std::string> CreateTestScopes() { 104 std::vector<std::string> CreateTestScopes() {
105 std::vector<std::string> scopes; 105 std::vector<std::string> scopes;
106 scopes.push_back("http://scope1"); 106 scopes.push_back("http://scope1");
107 scopes.push_back("http://scope2"); 107 scopes.push_back("http://scope2");
108 return scopes; 108 return scopes;
109 } 109 }
110 110
111 static IssueAdviceInfo CreateIssueAdvice() { 111 static IssueAdviceInfo CreateIssueAdvice() {
112 IssueAdviceInfo ia; 112 IssueAdviceInfo ia;
113 IssueAdviceInfoEntry e1; 113 IssueAdviceInfoEntry e1;
114 e1.description = ASCIIToUTF16("Manage your calendars"); 114 e1.description = base::ASCIIToUTF16("Manage your calendars");
115 e1.details.push_back(ASCIIToUTF16("View and manage your calendars")); 115 e1.details.push_back(base::ASCIIToUTF16("View and manage your calendars"));
116 ia.push_back(e1); 116 ia.push_back(e1);
117 IssueAdviceInfoEntry e2; 117 IssueAdviceInfoEntry e2;
118 e2.description = ASCIIToUTF16("Manage your documents"); 118 e2.description = base::ASCIIToUTF16("Manage your documents");
119 e2.details.push_back(ASCIIToUTF16("View your documents")); 119 e2.details.push_back(base::ASCIIToUTF16("View your documents"));
120 e2.details.push_back(ASCIIToUTF16("Upload new documents")); 120 e2.details.push_back(base::ASCIIToUTF16("Upload new documents"));
121 ia.push_back(e2); 121 ia.push_back(e2);
122 return ia; 122 return ia;
123 } 123 }
124 124
125 class MockDelegate : public OAuth2MintTokenFlow::Delegate { 125 class MockDelegate : public OAuth2MintTokenFlow::Delegate {
126 public: 126 public:
127 MockDelegate() {} 127 MockDelegate() {}
128 ~MockDelegate() {} 128 ~MockDelegate() {}
129 129
130 MOCK_METHOD2(OnMintTokenSuccess, void(const std::string& access_token, 130 MOCK_METHOD2(OnMintTokenSuccess, void(const std::string& access_token,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 { // Non-null delegate. 357 { // Non-null delegate.
358 GoogleServiceAuthError error( 358 GoogleServiceAuthError error(
359 GoogleServiceAuthError::FromConnectionError(101)); 359 GoogleServiceAuthError::FromConnectionError(101));
360 CreateFlow(OAuth2MintTokenFlow::MODE_MINT_TOKEN_NO_FORCE); 360 CreateFlow(OAuth2MintTokenFlow::MODE_MINT_TOKEN_NO_FORCE);
361 EXPECT_CALL(delegate_, OnMintTokenFailure(error)); 361 EXPECT_CALL(delegate_, OnMintTokenFailure(error));
362 flow_->ProcessMintAccessTokenFailure(error); 362 flow_->ProcessMintAccessTokenFailure(error);
363 } 363 }
364 } 364 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_mint_token_flow.cc ('k') | gpu/config/gpu_dx_diagnostics_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698