OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stdarg.h> | 5 #include <stdarg.h> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/password_manager/native_backend_gnome_x.h" | 12 #include "chrome/browser/password_manager/native_backend_gnome_x.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 #include "chrome/test/base/testing_browser_process_test.h" |
15 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
16 #include "chrome/test/testing_browser_process_test.h" | |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using webkit_glue::PasswordForm; | 19 using webkit_glue::PasswordForm; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // What follows is a very simple implementation of the subset of the GNOME | 23 // What follows is a very simple implementation of the subset of the GNOME |
24 // Keyring API that we actually use. It gets substituted for the real one by | 24 // Keyring API that we actually use. It gets substituted for the real one by |
25 // MockGnomeKeyringLoader, which hooks into the facility normally used to load | 25 // MockGnomeKeyringLoader, which hooks into the facility normally used to load |
26 // the GNOME Keyring library at runtime to avoid a static dependency on it. | 26 // the GNOME Keyring library at runtime to avoid a static dependency on it. |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 RunBothThreads(); | 858 RunBothThreads(); |
859 | 859 |
860 // The other two copies of the password in different profiles should remain. | 860 // The other two copies of the password in different profiles should remain. |
861 EXPECT_EQ(2u, mock_keyring_items.size()); | 861 EXPECT_EQ(2u, mock_keyring_items.size()); |
862 if (mock_keyring_items.size() > 0) | 862 if (mock_keyring_items.size() > 0) |
863 CheckMockKeyringItem(&mock_keyring_items[0], form_google_, "chrome"); | 863 CheckMockKeyringItem(&mock_keyring_items[0], form_google_, "chrome"); |
864 if (mock_keyring_items.size() > 1) | 864 if (mock_keyring_items.size() > 1) |
865 CheckMockKeyringItem(&mock_keyring_items[1], form_google_, "chrome-42"); | 865 CheckMockKeyringItem(&mock_keyring_items[1], form_google_, "chrome-42"); |
866 } | 866 } |
867 } | 867 } |
OLD | NEW |