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

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

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (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
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/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/fake_auth_status_provider.h" 9 #include "chrome/browser/signin/fake_auth_status_provider.h"
10 #include "chrome/browser/signin/fake_signin_manager.h" 10 #include "chrome/browser/signin/fake_signin_manager.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 signin, 341 signin,
342 sync_ui_util::WITH_HTML, 342 sync_ui_util::WITH_HTML,
343 &status_label, 343 &status_label,
344 &link_label); 344 &link_label);
345 // If the status and link message combination is already present in the set 345 // If the status and link message combination is already present in the set
346 // of messages already seen, this is a duplicate rather than a unique 346 // of messages already seen, this is a duplicate rather than a unique
347 // message, and the test has failed. 347 // message, and the test has failed.
348 EXPECT_FALSE(status_label.empty()) << 348 EXPECT_FALSE(status_label.empty()) <<
349 "Empty status label returned for case #" << idx; 349 "Empty status label returned for case #" << idx;
350 base::string16 combined_label = 350 base::string16 combined_label =
351 status_label + base::string16(ASCIIToUTF16("#")) + link_label; 351 status_label + base::ASCIIToUTF16("#") + link_label;
352 EXPECT_TRUE(messages.find(combined_label) == messages.end()) << 352 EXPECT_TRUE(messages.find(combined_label) == messages.end()) <<
353 "Duplicate message for case #" << idx << ": " << combined_label; 353 "Duplicate message for case #" << idx << ": " << combined_label;
354 messages.insert(combined_label); 354 messages.insert(combined_label);
355 testing::Mock::VerifyAndClearExpectations(&service); 355 testing::Mock::VerifyAndClearExpectations(&service);
356 testing::Mock::VerifyAndClearExpectations(&signin); 356 testing::Mock::VerifyAndClearExpectations(&signin);
357 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error)); 357 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error));
358 provider.reset(); 358 provider.reset();
359 signin.Shutdown(); 359 signin.Shutdown();
360 } 360 }
361 } 361 }
(...skipping 18 matching lines...) Expand all
380 sync_ui_util::GetStatusLabels(&service, 380 sync_ui_util::GetStatusLabels(&service,
381 signin, 381 signin,
382 sync_ui_util::PLAIN_TEXT, 382 sync_ui_util::PLAIN_TEXT,
383 &status_label, 383 &status_label,
384 &link_label); 384 &link_label);
385 385
386 // Ensures a search for string 'href' (found in links, not a string to be 386 // Ensures a search for string 'href' (found in links, not a string to be
387 // found in an English language message) fails when links are excluded from 387 // found in an English language message) fails when links are excluded from
388 // the status label. 388 // the status label.
389 EXPECT_FALSE(status_label.empty()); 389 EXPECT_FALSE(status_label.empty());
390 EXPECT_EQ(status_label.find(base::string16(ASCIIToUTF16("href"))), 390 EXPECT_EQ(status_label.find(base::ASCIIToUTF16("href")),
391 base::string16::npos); 391 base::string16::npos);
392 testing::Mock::VerifyAndClearExpectations(&service); 392 testing::Mock::VerifyAndClearExpectations(&service);
393 testing::Mock::VerifyAndClearExpectations(&signin); 393 testing::Mock::VerifyAndClearExpectations(&signin);
394 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error)); 394 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error));
395 provider.reset(); 395 provider.reset();
396 signin.Shutdown(); 396 signin.Shutdown();
397 } 397 }
398 } 398 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698