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 ab90a32f1725503624e06f832e8454337ee39e56..1aa95dcd76c6acc43ee53aadef7d45feb4872453 100644 |
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc |
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc |
@@ -28,6 +28,7 @@ |
#include "chrome/browser/policy/policy_service.h" |
#include "chrome/browser/policy/proto/device_management_backend.pb.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/rlz/rlz.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
@@ -50,6 +51,10 @@ |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#if defined(ENABLE_RLZ) |
+#include "rlz/lib/rlz_value_store.h" |
+#endif |
+ |
namespace chromeos { |
namespace { |
@@ -264,6 +269,11 @@ class LoginUtilsTest : public testing::Test, |
NULL, NULL)); |
browser_process_->SetIOThread(io_thread_state_.get()); |
+#if defined(ENABLE_RLZ) |
+ rlz_lib::testing::SetRlzStoreDirectory(scoped_temp_dir_.path()); |
+ RLZTracker::EnableZeroDelayForTesting(); |
+#endif |
+ |
RunUntilIdle(); |
} |
@@ -276,6 +286,9 @@ class LoginUtilsTest : public testing::Test, |
InvokeOnIO( |
base::Bind(&LoginUtilsTest::TearDownOnIO, base::Unretained(this))); |
+ // LoginUtils instance must not outlive Profile instances. |
+ LoginUtils::Set(NULL); |
+ |
// These trigger some tasks that have to run while BrowserThread::UI |
// exists. Delete all the profiles before deleting the connector. |
browser_process_->SetProfileManager(NULL); |