| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/password_manager/password_store_factory.h" | 9 #include "chrome/browser/password_manager/password_store_factory.h" |
| 10 #include "chrome/browser/profiles/profile_info_cache.h" | 10 #include "chrome/browser/profiles/profile_info_cache.h" |
| 11 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 11 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/browser/profiles/profile_window.h" | 13 #include "chrome/browser/profiles/profile_window.h" |
| 14 #include "chrome/browser/profiles/profiles_state.h" | 14 #include "chrome/browser/profiles/profiles_state.h" |
| 15 #include "chrome/browser/ui/browser_finder.h" | 15 #include "chrome/browser/ui/browser_finder.h" |
| 16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
| 17 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
| 18 #include "chrome/browser/ui/host_desktop.h" | 18 #include "chrome/browser/ui/host_desktop.h" |
| 19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
| 21 #include "chrome/test/base/test_switches.h" | 21 #include "chrome/test/base/test_switches.h" |
| 22 #include "chrome/test/base/testing_browser_process.h" | 22 #include "chrome/test/base/testing_browser_process.h" |
| 23 #include "chrome/test/base/ui_test_utils.h" | |
| 24 #include "components/autofill/core/common/password_form.h" | 23 #include "components/autofill/core/common/password_form.h" |
| 25 #include "components/password_manager/core/browser/password_store.h" | 24 #include "components/password_manager/core/browser/password_store.h" |
| 26 #include "components/password_manager/core/browser/password_store_consumer.h" | 25 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 26 #include "content/public/test/test_utils.h" |
| 27 | 27 |
| 28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 29 #include "base/path_service.h" | 29 #include "base/path_service.h" |
| 30 #include "chrome/common/chrome_constants.h" | 30 #include "chrome/common/chrome_constants.h" |
| 31 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
| 32 #include "chromeos/chromeos_switches.h" | 32 #include "chromeos/chromeos_switches.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 run_loop.QuitClosure()); | 442 run_loop.QuitClosure()); |
| 443 EXPECT_TRUE(password_store->ScheduleTask(task)); | 443 EXPECT_TRUE(password_store->ScheduleTask(task)); |
| 444 run_loop.Run(); | 444 run_loop.Run(); |
| 445 | 445 |
| 446 EXPECT_TRUE(verify_add.IsCalled()); | 446 EXPECT_TRUE(verify_add.IsCalled()); |
| 447 EXPECT_EQ(1u, verify_add.GetPasswords().size()); | 447 EXPECT_EQ(1u, verify_add.GetPasswords().size()); |
| 448 EXPECT_TRUE(verify_delete.IsCalled()); | 448 EXPECT_TRUE(verify_delete.IsCalled()); |
| 449 EXPECT_EQ(0u, verify_delete.GetPasswords().size()); | 449 EXPECT_EQ(0u, verify_delete.GetPasswords().size()); |
| 450 } | 450 } |
| 451 #endif // !defined(OS_WIN) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 451 #endif // !defined(OS_WIN) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| OLD | NEW |