OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/prefs/pref_service.h" | |
11 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
12 #include "build/build_config.h" | 11 #include "build/build_config.h" |
13 #include "chrome/browser/password_manager/password_store_factory.h" | 12 #include "chrome/browser/password_manager/password_store_factory.h" |
14 #include "chrome/browser/profiles/profile_info_cache.h" | 13 #include "chrome/browser/profiles/profile_info_cache.h" |
15 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 14 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/profiles/profile_window.h" | 16 #include "chrome/browser/profiles/profile_window.h" |
18 #include "chrome/browser/profiles/profiles_state.h" | 17 #include "chrome/browser/profiles/profiles_state.h" |
19 #include "chrome/browser/ui/browser_finder.h" | 18 #include "chrome/browser/ui/browser_finder.h" |
20 #include "chrome/browser/ui/browser_list.h" | 19 #include "chrome/browser/ui/browser_list.h" |
21 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
22 #include "chrome/browser/ui/host_desktop.h" | 21 #include "chrome/browser/ui/host_desktop.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
24 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
25 #include "chrome/test/base/test_switches.h" | 24 #include "chrome/test/base/test_switches.h" |
26 #include "chrome/test/base/testing_browser_process.h" | 25 #include "chrome/test/base/testing_browser_process.h" |
27 #include "components/autofill/core/common/password_form.h" | 26 #include "components/autofill/core/common/password_form.h" |
28 #include "components/password_manager/core/browser/password_store.h" | 27 #include "components/password_manager/core/browser/password_store.h" |
29 #include "components/password_manager/core/browser/password_store_consumer.h" | 28 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 29 #include "components/prefs/pref_service.h" |
30 #include "content/public/test/test_utils.h" | 30 #include "content/public/test/test_utils.h" |
31 | 31 |
32 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
33 #include "base/path_service.h" | 33 #include "base/path_service.h" |
34 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 34 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
35 #include "chrome/common/chrome_constants.h" | 35 #include "chrome/common/chrome_constants.h" |
36 #include "chrome/common/chrome_paths.h" | 36 #include "chrome/common/chrome_paths.h" |
37 #include "chromeos/chromeos_switches.h" | 37 #include "chromeos/chromeos_switches.h" |
38 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
39 #endif | 39 #endif |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 ASSERT_TRUE(profile_manager->IsValidProfile(incognito_profile)); | 487 ASSERT_TRUE(profile_manager->IsValidProfile(incognito_profile)); |
488 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); | 488 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); |
489 | 489 |
490 // Delete the incognito profile. | 490 // Delete the incognito profile. |
491 incognito_profile->GetOriginalProfile()->DestroyOffTheRecordProfile(); | 491 incognito_profile->GetOriginalProfile()->DestroyOffTheRecordProfile(); |
492 | 492 |
493 EXPECT_FALSE(profile->HasOffTheRecordProfile()); | 493 EXPECT_FALSE(profile->HasOffTheRecordProfile()); |
494 EXPECT_FALSE(profile_manager->IsValidProfile(incognito_profile)); | 494 EXPECT_FALSE(profile_manager->IsValidProfile(incognito_profile)); |
495 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); | 495 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); |
496 } | 496 } |
OLD | NEW |