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

Side by Side Diff: chrome/browser/sync/sync_ui_util_unittest.cc

Issue 10696107: sync: Track validity of about:sync fields (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years, 5 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 <set> 5 #include <set>
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/signin_manager.h" 9 #include "chrome/browser/signin/signin_manager.h"
11 #include "chrome/browser/signin/signin_manager_fake.h" 10 #include "chrome/browser/signin/signin_manager_fake.h"
12 #include "chrome/browser/sync/profile_sync_service_mock.h" 11 #include "chrome/browser/sync/profile_sync_service_mock.h"
13 #include "chrome/browser/sync/sync_ui_util.h" 12 #include "chrome/browser/sync/sync_ui_util.h"
14 #include "content/public/test/test_browser_thread.h" 13 #include "content/public/test/test_browser_thread.h"
15 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
16 #include "testing/gmock/include/gmock/gmock-actions.h" 15 #include "testing/gmock/include/gmock/gmock-actions.h"
17 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
19 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
20 19
21 using ::testing::AtMost; 20 using ::testing::AtMost;
21 using ::testing::NiceMock;
22 using ::testing::Return; 22 using ::testing::Return;
23 using ::testing::ReturnRef; 23 using ::testing::ReturnRef;
24 using ::testing::NiceMock; 24 using ::testing::SetArgPointee;
25 using ::testing::_;
25 using content::BrowserThread; 26 using content::BrowserThread;
26 27
27 // A number of distinct states of the ProfileSyncService can be generated for 28 // A number of distinct states of the ProfileSyncService can be generated for
28 // tests. 29 // tests.
29 enum DistinctState { 30 enum DistinctState {
30 STATUS_CASE_SETUP_IN_PROGRESS, 31 STATUS_CASE_SETUP_IN_PROGRESS,
31 STATUS_CASE_SETUP_ERROR, 32 STATUS_CASE_SETUP_ERROR,
32 STATUS_CASE_AUTHENTICATING, 33 STATUS_CASE_AUTHENTICATING,
33 STATUS_CASE_AUTH_ERROR, 34 STATUS_CASE_AUTH_ERROR,
34 STATUS_CASE_PROTOCOL_ERROR, 35 STATUS_CASE_PROTOCOL_ERROR,
(...skipping 26 matching lines...) Expand all
61 string16 label1, label2, label3; 62 string16 label1, label2, label3;
62 sync_ui_util::GetStatusLabelsForSyncGlobalError( 63 sync_ui_util::GetStatusLabelsForSyncGlobalError(
63 service, signin, &label1, &label2, &label3); 64 service, signin, &label1, &label2, &label3);
64 EXPECT_EQ(label1.empty(), !is_error); 65 EXPECT_EQ(label1.empty(), !is_error);
65 EXPECT_EQ(label2.empty(), !is_error); 66 EXPECT_EQ(label2.empty(), !is_error);
66 EXPECT_EQ(label3.empty(), !is_error); 67 EXPECT_EQ(label3.empty(), !is_error);
67 } 68 }
68 69
69 } // namespace 70 } // namespace
70 71
71 TEST(SyncUIUtilTest, ConstructAboutInformationWithUnrecoverableErrorTest) {
72 MessageLoopForUI message_loop;
73 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
74 scoped_ptr<Profile> profile(
75 ProfileSyncServiceMock::MakeSignedInTestingProfile());
76 NiceMock<ProfileSyncServiceMock> service(profile.get());
77 DictionaryValue strings;
78
79 // Will be released when the dictionary is destroyed
80 string16 str(ASCIIToUTF16("none"));
81
82 browser_sync::SyncBackendHost::Status status;
83
84 EXPECT_CALL(service, HasSyncSetupCompleted())
85 .WillOnce(Return(true));
86 EXPECT_CALL(service, QueryDetailedSyncStatus())
87 .WillOnce(Return(status));
88
89 EXPECT_CALL(service, HasUnrecoverableError())
90 .WillRepeatedly(Return(true));
91
92 EXPECT_CALL(service, GetLastSyncedTimeString())
93 .WillOnce(Return(str));
94
95 sync_ui_util::ConstructAboutInformation(&service, &strings);
96
97 EXPECT_TRUE(strings.HasKey("unrecoverable_error_detected"));
98 }
99 72
100 // Test that GetStatusLabelsForSyncGlobalError returns an error if a 73 // Test that GetStatusLabelsForSyncGlobalError returns an error if a
101 // passphrase is required. 74 // passphrase is required.
102 TEST(SyncUIUtilTest, PassphraseGlobalError) { 75 TEST(SyncUIUtilTest, PassphraseGlobalError) {
103 MessageLoopForUI message_loop; 76 MessageLoopForUI message_loop;
104 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); 77 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
105 scoped_ptr<Profile> profile( 78 scoped_ptr<Profile> profile(
106 ProfileSyncServiceMock::MakeSignedInTestingProfile()); 79 ProfileSyncServiceMock::MakeSignedInTestingProfile());
107 NiceMock<ProfileSyncServiceMock> service(profile.get()); 80 NiceMock<ProfileSyncServiceMock> service(profile.get());
108 FakeSigninManager signin; 81 FakeSigninManager signin;
109 browser_sync::SyncBackendHost::Status status; 82 browser_sync::SyncBackendHost::Status status;
110 EXPECT_CALL(service, QueryDetailedSyncStatus()) 83 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
111 .WillRepeatedly(Return(status)); 84 .WillRepeatedly(Return(false));
112 85
113 EXPECT_CALL(service, IsPassphraseRequired()) 86 EXPECT_CALL(service, IsPassphraseRequired())
114 .WillRepeatedly(Return(true)); 87 .WillRepeatedly(Return(true));
115 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) 88 EXPECT_CALL(service, IsPassphraseRequiredForDecryption())
116 .WillRepeatedly(Return(true)); 89 .WillRepeatedly(Return(true));
117 VerifySyncGlobalErrorResult( 90 VerifySyncGlobalErrorResult(
118 &service, signin, GoogleServiceAuthError::NONE, true, true); 91 &service, signin, GoogleServiceAuthError::NONE, true, true);
119 } 92 }
120 93
121 // Test that GetStatusLabelsForSyncGlobalError returns an error if a 94 // Test that GetStatusLabelsForSyncGlobalError returns an error if a
122 // passphrase is required. 95 // passphrase is required.
123 TEST(SyncUIUtilTest, AuthAndPassphraseGlobalError) { 96 TEST(SyncUIUtilTest, AuthAndPassphraseGlobalError) {
124 MessageLoopForUI message_loop; 97 MessageLoopForUI message_loop;
125 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); 98 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
126 scoped_ptr<Profile> profile( 99 scoped_ptr<Profile> profile(
127 ProfileSyncServiceMock::MakeSignedInTestingProfile()); 100 ProfileSyncServiceMock::MakeSignedInTestingProfile());
128 NiceMock<ProfileSyncServiceMock> service(profile.get()); 101 NiceMock<ProfileSyncServiceMock> service(profile.get());
129 FakeSigninManager signin; 102 FakeSigninManager signin;
130 browser_sync::SyncBackendHost::Status status; 103 browser_sync::SyncBackendHost::Status status;
131 EXPECT_CALL(service, QueryDetailedSyncStatus()) 104 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
132 .WillRepeatedly(Return(status)); 105 .WillRepeatedly(Return(false));
133 106
134 EXPECT_CALL(service, IsPassphraseRequired()) 107 EXPECT_CALL(service, IsPassphraseRequired())
135 .WillRepeatedly(Return(true)); 108 .WillRepeatedly(Return(true));
136 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) 109 EXPECT_CALL(service, IsPassphraseRequiredForDecryption())
137 .WillRepeatedly(Return(true)); 110 .WillRepeatedly(Return(true));
138 EXPECT_CALL(service, HasSyncSetupCompleted()) 111 EXPECT_CALL(service, HasSyncSetupCompleted())
139 .WillRepeatedly(Return(true)); 112 .WillRepeatedly(Return(true));
140 113
141 GoogleServiceAuthError auth_error( 114 GoogleServiceAuthError auth_error(
142 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); 115 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
(...skipping 10 matching lines...) Expand all
153 // that can be resolved by the user and suppresses errors for conditions that 126 // that can be resolved by the user and suppresses errors for conditions that
154 // cannot be resolved by the user. 127 // cannot be resolved by the user.
155 TEST(SyncUIUtilTest, AuthStateGlobalError) { 128 TEST(SyncUIUtilTest, AuthStateGlobalError) {
156 MessageLoopForUI message_loop; 129 MessageLoopForUI message_loop;
157 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); 130 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
158 scoped_ptr<Profile> profile( 131 scoped_ptr<Profile> profile(
159 ProfileSyncServiceMock::MakeSignedInTestingProfile()); 132 ProfileSyncServiceMock::MakeSignedInTestingProfile());
160 NiceMock<ProfileSyncServiceMock> service(profile.get()); 133 NiceMock<ProfileSyncServiceMock> service(profile.get());
161 134
162 browser_sync::SyncBackendHost::Status status; 135 browser_sync::SyncBackendHost::Status status;
163 EXPECT_CALL(service, QueryDetailedSyncStatus()) 136 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
164 .WillRepeatedly(Return(status)); 137 .WillRepeatedly(Return(false));
165 138
166 struct { 139 struct {
167 GoogleServiceAuthError::State error_state; 140 GoogleServiceAuthError::State error_state;
168 bool is_error; 141 bool is_error;
169 } table[] = { 142 } table[] = {
170 { GoogleServiceAuthError::NONE, false }, 143 { GoogleServiceAuthError::NONE, false },
171 { GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, true }, 144 { GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, true },
172 { GoogleServiceAuthError::USER_NOT_SIGNED_UP, true }, 145 { GoogleServiceAuthError::USER_NOT_SIGNED_UP, true },
173 { GoogleServiceAuthError::CONNECTION_FAILED, false }, 146 { GoogleServiceAuthError::CONNECTION_FAILED, false },
174 { GoogleServiceAuthError::CAPTCHA_REQUIRED, true }, 147 { GoogleServiceAuthError::CAPTCHA_REQUIRED, true },
(...skipping 22 matching lines...) Expand all
197 // Auth Error object is returned by reference in mock and needs to stay in 170 // Auth Error object is returned by reference in mock and needs to stay in
198 // scope throughout test, so it is owned by calling method. However it is 171 // scope throughout test, so it is owned by calling method. However it is
199 // immutable so can only be allocated in this method. 172 // immutable so can only be allocated in this method.
200 switch (caseNumber) { 173 switch (caseNumber) {
201 case STATUS_CASE_SETUP_IN_PROGRESS: { 174 case STATUS_CASE_SETUP_IN_PROGRESS: {
202 EXPECT_CALL(service, HasSyncSetupCompleted()) 175 EXPECT_CALL(service, HasSyncSetupCompleted())
203 .WillOnce(Return(false)); 176 .WillOnce(Return(false));
204 EXPECT_CALL(service, FirstSetupInProgress()) 177 EXPECT_CALL(service, FirstSetupInProgress())
205 .WillOnce(Return(true)); 178 .WillOnce(Return(true));
206 browser_sync::SyncBackendHost::Status status; 179 browser_sync::SyncBackendHost::Status status;
207 EXPECT_CALL(service, QueryDetailedSyncStatus()) 180 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
208 .WillOnce(Return(status)); 181 .WillOnce(DoAll(SetArgPointee<0>(status),
182 Return(false)));
209 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE); 183 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE);
210 EXPECT_CALL(service, GetAuthError()) 184 EXPECT_CALL(service, GetAuthError())
211 .WillOnce(ReturnRef(**auth_error)); 185 .WillOnce(ReturnRef(**auth_error));
212 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 186 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
213 return; 187 return;
214 } 188 }
215 case STATUS_CASE_SETUP_ERROR: { 189 case STATUS_CASE_SETUP_ERROR: {
216 EXPECT_CALL(service, HasSyncSetupCompleted()) 190 EXPECT_CALL(service, HasSyncSetupCompleted())
217 .WillOnce(Return(false)); 191 .WillOnce(Return(false));
218 EXPECT_CALL(service, FirstSetupInProgress()) 192 EXPECT_CALL(service, FirstSetupInProgress())
219 .WillOnce(Return(false)); 193 .WillOnce(Return(false));
220 EXPECT_CALL(service, HasUnrecoverableError()) 194 EXPECT_CALL(service, HasUnrecoverableError())
221 .WillOnce(Return(true)); 195 .WillOnce(Return(true));
222 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 196 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
223 browser_sync::SyncBackendHost::Status status; 197 browser_sync::SyncBackendHost::Status status;
224 EXPECT_CALL(service, QueryDetailedSyncStatus()) 198 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
225 .WillOnce(Return(status)); 199 .WillOnce(DoAll(SetArgPointee<0>(status),
200 Return(false)));
226 return; 201 return;
227 } 202 }
228 case STATUS_CASE_AUTHENTICATING: { 203 case STATUS_CASE_AUTHENTICATING: {
229 EXPECT_CALL(service, HasSyncSetupCompleted()) 204 EXPECT_CALL(service, HasSyncSetupCompleted())
230 .WillOnce(Return(true)); 205 .WillOnce(Return(true));
231 browser_sync::SyncBackendHost::Status status; 206 browser_sync::SyncBackendHost::Status status;
232 EXPECT_CALL(service, QueryDetailedSyncStatus()) 207 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
233 .WillOnce(Return(status)); 208 .WillOnce(DoAll(SetArgPointee<0>(status),
209 Return(false)));
234 EXPECT_CALL(service, HasUnrecoverableError()) 210 EXPECT_CALL(service, HasUnrecoverableError())
235 .WillOnce(Return(false)); 211 .WillOnce(Return(false));
236 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(true)); 212 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(true));
237 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE); 213 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE);
238 EXPECT_CALL(service, GetAuthError()) 214 EXPECT_CALL(service, GetAuthError())
239 .WillOnce(ReturnRef(**auth_error)); 215 .WillOnce(ReturnRef(**auth_error));
240 return; 216 return;
241 } 217 }
242 case STATUS_CASE_AUTH_ERROR: { 218 case STATUS_CASE_AUTH_ERROR: {
243 EXPECT_CALL(service, HasSyncSetupCompleted()) 219 EXPECT_CALL(service, HasSyncSetupCompleted())
244 .WillOnce(Return(true)); 220 .WillOnce(Return(true));
245 browser_sync::SyncBackendHost::Status status; 221 browser_sync::SyncBackendHost::Status status;
246 EXPECT_CALL(service, QueryDetailedSyncStatus()) 222 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
247 .WillOnce(Return(status)); 223 .WillOnce(DoAll(SetArgPointee<0>(status),
224 Return(false)));
248 *auth_error = new GoogleServiceAuthError( 225 *auth_error = new GoogleServiceAuthError(
249 GoogleServiceAuthError::SERVICE_UNAVAILABLE); 226 GoogleServiceAuthError::SERVICE_UNAVAILABLE);
250 EXPECT_CALL(service, HasUnrecoverableError()) 227 EXPECT_CALL(service, HasUnrecoverableError())
251 .WillOnce(Return(false)); 228 .WillOnce(Return(false));
252 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 229 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
253 EXPECT_CALL(service, GetAuthError()) 230 EXPECT_CALL(service, GetAuthError())
254 .WillOnce(ReturnRef(**auth_error)); 231 .WillOnce(ReturnRef(**auth_error));
255 return; 232 return;
256 } 233 }
257 case STATUS_CASE_PROTOCOL_ERROR: { 234 case STATUS_CASE_PROTOCOL_ERROR: {
258 EXPECT_CALL(service, HasSyncSetupCompleted()) 235 EXPECT_CALL(service, HasSyncSetupCompleted())
259 .WillOnce(Return(true)); 236 .WillOnce(Return(true));
260 syncer::SyncProtocolError protocolError; 237 syncer::SyncProtocolError protocolError;
261 protocolError.action = syncer::STOP_AND_RESTART_SYNC; 238 protocolError.action = syncer::STOP_AND_RESTART_SYNC;
262 browser_sync::SyncBackendHost::Status status; 239 browser_sync::SyncBackendHost::Status status;
263 status.sync_protocol_error = protocolError; 240 status.sync_protocol_error = protocolError;
264 EXPECT_CALL(service, QueryDetailedSyncStatus()) 241 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
265 .WillOnce(Return(status)); 242 .WillOnce(DoAll(SetArgPointee<0>(status),
243 Return(false)));
266 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE); 244 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE);
267 EXPECT_CALL(service, GetAuthError()) 245 EXPECT_CALL(service, GetAuthError())
268 .WillOnce(ReturnRef(**auth_error)); 246 .WillOnce(ReturnRef(**auth_error));
269 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 247 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
270 EXPECT_CALL(service, HasUnrecoverableError()) 248 EXPECT_CALL(service, HasUnrecoverableError())
271 .WillOnce(Return(false)); 249 .WillOnce(Return(false));
272 return; 250 return;
273 } 251 }
274 case STATUS_CASE_PASSPHRASE_ERROR: { 252 case STATUS_CASE_PASSPHRASE_ERROR: {
275 EXPECT_CALL(service, HasSyncSetupCompleted()) 253 EXPECT_CALL(service, HasSyncSetupCompleted())
276 .WillOnce(Return(true)); 254 .WillOnce(Return(true));
277 browser_sync::SyncBackendHost::Status status; 255 browser_sync::SyncBackendHost::Status status;
278 EXPECT_CALL(service, QueryDetailedSyncStatus()) 256 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
279 .WillOnce(Return(status)); 257 .WillOnce(DoAll(SetArgPointee<0>(status),
258 Return(false)));
280 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE); 259 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE);
281 EXPECT_CALL(service, GetAuthError()) 260 EXPECT_CALL(service, GetAuthError())
282 .WillOnce(ReturnRef(**auth_error)); 261 .WillOnce(ReturnRef(**auth_error));
283 EXPECT_CALL(service, HasUnrecoverableError()) 262 EXPECT_CALL(service, HasUnrecoverableError())
284 .WillOnce(Return(false)); 263 .WillOnce(Return(false));
285 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 264 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
286 EXPECT_CALL(service, IsPassphraseRequired()) 265 EXPECT_CALL(service, IsPassphraseRequired())
287 .WillOnce(Return(true)); 266 .WillOnce(Return(true));
288 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) 267 EXPECT_CALL(service, IsPassphraseRequiredForDecryption())
289 .WillOnce(Return(true)); 268 .WillOnce(Return(true));
290 return; 269 return;
291 } 270 }
292 case STATUS_CASE_SYNCED: { 271 case STATUS_CASE_SYNCED: {
293 EXPECT_CALL(service, HasSyncSetupCompleted()) 272 EXPECT_CALL(service, HasSyncSetupCompleted())
294 .WillOnce(Return(true)); 273 .WillOnce(Return(true));
295 browser_sync::SyncBackendHost::Status status; 274 browser_sync::SyncBackendHost::Status status;
296 EXPECT_CALL(service, QueryDetailedSyncStatus()) 275 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
297 .WillOnce(Return(status)); 276 .WillOnce(DoAll(SetArgPointee<0>(status),
277 Return(false)));
298 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE); 278 *auth_error = new GoogleServiceAuthError(GoogleServiceAuthError::NONE);
299 EXPECT_CALL(service, GetAuthError()) 279 EXPECT_CALL(service, GetAuthError())
300 .WillOnce(ReturnRef(**auth_error)); 280 .WillOnce(ReturnRef(**auth_error));
301 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false)); 281 EXPECT_CALL(signin, AuthInProgress()).WillRepeatedly(Return(false));
302 EXPECT_CALL(service, HasUnrecoverableError()) 282 EXPECT_CALL(service, HasUnrecoverableError())
303 .WillOnce(Return(false)); 283 .WillOnce(Return(false));
304 EXPECT_CALL(service, IsPassphraseRequired()) 284 EXPECT_CALL(service, IsPassphraseRequired())
305 .WillOnce(Return(false)); 285 .WillOnce(Return(false));
306 return; 286 return;
307 } 287 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // Ensures a search for string 'href' (found in links, not a string to be 341 // Ensures a search for string 'href' (found in links, not a string to be
362 // found in an English language message) fails when links are excluded from 342 // found in an English language message) fails when links are excluded from
363 // the status label. 343 // the status label.
364 EXPECT_EQ(status_label.find(string16(ASCIIToUTF16("href"))), 344 EXPECT_EQ(status_label.find(string16(ASCIIToUTF16("href"))),
365 string16::npos); 345 string16::npos);
366 if (auth_error) { 346 if (auth_error) {
367 delete auth_error; 347 delete auth_error;
368 } 348 }
369 } 349 }
370 } 350 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698