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

Unified Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 11645040: RLZ on ChromeOS-related polishing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix RlzInitialized being hung Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_login_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc
index 198c78e4f7f646a100240eee167701d22bc7d9c4..80092e9936b0e5dc1c3877b4573c67f0a664e58b 100644
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc
@@ -274,6 +274,7 @@ class LoginUtilsTest : public testing::Test,
browser_process_->SetIOThread(io_thread_state_.get());
#if defined(ENABLE_RLZ)
+ rlz_initialized_cb_ = base::Bind(&base::DoNothing);
rlz_lib::testing::SetRlzStoreDirectory(scoped_temp_dir_.path());
RLZTracker::EnableZeroDelayForTesting();
#endif
@@ -562,15 +563,15 @@ TEST_F(LoginUtilsTest, RlzInitialized) {
PrepareProfile(kUsername);
- wait_for_rlz_init.Run();
- // Wait for blocking RLZ tasks to complete.
- RunUntilIdle();
-
// This should shortcut cookie transfer step that is missing due to
// IO thread being mocked.
EXPECT_TRUE(created_profile_);
LoginUtils::Get()->CompleteProfileCreate(created_profile_);
+ wait_for_rlz_init.Run();
+ // Wait for blocking RLZ tasks to complete.
+ RunUntilIdle();
+
// RLZ brand code has been set to empty string.
EXPECT_TRUE(local_state_.Get()->HasPrefPath(prefs::kRLZBrand));
EXPECT_EQ(std::string(), local_state_.Get()->GetString(prefs::kRLZBrand));
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698