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 <algorithm> | 5 #include <algorithm> |
6 #include <map> | 6 #include <map> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" | 15 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
16 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
19 #include "content/test/test_browser_thread.h" | 19 #include "content/test/test_browser_thread.h" |
20 #include "dbus/message.h" | 20 #include "dbus/message.h" |
21 #include "dbus/mock_bus.h" | 21 #include "dbus/mock_bus.h" |
22 #include "dbus/mock_object_proxy.h" | 22 #include "dbus/mock_object_proxy.h" |
23 #include "dbus/object_proxy.h" | 23 #include "dbus/object_proxy.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
| 27 using content::BrowserThread; |
27 using testing::_; | 28 using testing::_; |
28 using testing::Invoke; | 29 using testing::Invoke; |
29 using testing::Return; | 30 using testing::Return; |
30 using webkit_glue::PasswordForm; | 31 using webkit_glue::PasswordForm; |
31 | 32 |
32 namespace { | 33 namespace { |
33 | 34 |
34 // This class implements a very simple version of KWallet in memory. | 35 // This class implements a very simple version of KWallet in memory. |
35 // We only provide the parts we actually use; the real version has more. | 36 // We only provide the parts we actually use; the real version has more. |
36 class TestKWallet { | 37 class TestKWallet { |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 983 |
983 RunDBThread(); | 984 RunDBThread(); |
984 | 985 |
985 // The other two copies of the password in different profiles should remain. | 986 // The other two copies of the password in different profiles should remain. |
986 CheckPasswordForms("Chrome Form Data", expected); | 987 CheckPasswordForms("Chrome Form Data", expected); |
987 CheckPasswordForms("Chrome Form Data (42)", expected); | 988 CheckPasswordForms("Chrome Form Data (42)", expected); |
988 expected.clear(); | 989 expected.clear(); |
989 CheckPasswordForms("Chrome Form Data (24)", expected); | 990 CheckPasswordForms("Chrome Form Data (24)", expected); |
990 } | 991 } |
991 } | 992 } |
OLD | NEW |