| Index: chrome/browser/profiles/profile_info_cache_unittest.cc
|
| diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
|
| index 571411501df6202e6bf58638e5e5fc9f24df01b3..a0e8ab5bad559fd02aade374aee462ac767320b5 100644
|
| --- a/chrome/browser/profiles/profile_info_cache_unittest.cc
|
| +++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/prefs/testing_pref_service.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/time/time.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/prefs/pref_service_syncable.h"
|
| @@ -307,6 +308,18 @@ TEST_F(ProfileInfoCacheTest, HasMigrated) {
|
| EXPECT_FALSE(GetCache()->GetHasMigratedToGAIAInfoOfProfileAtIndex(1));
|
| }
|
|
|
| +TEST_F(ProfileInfoCacheTest, ProfileActive) {
|
| + GetCache()->AddProfileToCache(
|
| + GetProfilePath("path_1"), ASCIIToUTF16("name_1"),
|
| + base::string16(), 0, std::string());
|
| + EXPECT_EQ(base::Time(), GetCache()->GetProfileActive(0));
|
| + base::Time before = base::Time::Now();
|
| + GetCache()->SetProfileActive(0);
|
| + base::Time after = base::Time::Now();
|
| + EXPECT_LE(before, GetCache()->GetProfileActive(0));
|
| + EXPECT_GE(after, GetCache()->GetProfileActive(0));
|
| +}
|
| +
|
| TEST_F(ProfileInfoCacheTest, GAIAName) {
|
| GetCache()->AddProfileToCache(
|
| GetProfilePath("path_1"), ASCIIToUTF16("name_1"),
|
|
|