Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <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/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
16 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" 16 #include "chrome/browser/password_manager/native_backend_kwallet_x.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/public/test/test_browser_thread.h" 19 #include "content/public/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_path.h" 23 #include "dbus/object_path.h"
24 #include "dbus/object_proxy.h" 24 #include "dbus/object_proxy.h"
25 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 using autofill::PasswordForm;
28 using content::BrowserThread; 29 using content::BrowserThread;
29 using testing::_; 30 using testing::_;
30 using testing::Invoke; 31 using testing::Invoke;
31 using testing::Return; 32 using testing::Return;
32 using content::PasswordForm;
33 33
34 namespace { 34 namespace {
35 35
36 // This class implements a very simple version of KWallet in memory. 36 // This class implements a very simple version of KWallet in memory.
37 // We only provide the parts we actually use; the real version has more. 37 // We only provide the parts we actually use; the real version has more.
38 class TestKWallet { 38 class TestKWallet {
39 public: 39 public:
40 typedef std::basic_string<uint8_t> Blob; // std::string is binary-safe. 40 typedef std::basic_string<uint8_t> Blob; // std::string is binary-safe.
41 41
42 TestKWallet() : reject_local_folders_(false) {} 42 TestKWallet() : reject_local_folders_(false) {}
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 CheckVersion0Pickle(true, PasswordForm::SCHEME_BASIC); 1078 CheckVersion0Pickle(true, PasswordForm::SCHEME_BASIC);
1079 } 1079 }
1080 1080
1081 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTMLPickles) { 1081 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTMLPickles) {
1082 CheckVersion0Pickle(false, PasswordForm::SCHEME_HTML); 1082 CheckVersion0Pickle(false, PasswordForm::SCHEME_HTML);
1083 } 1083 }
1084 1084
1085 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTTPPickles) { 1085 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTTPPickles) {
1086 CheckVersion0Pickle(false, PasswordForm::SCHEME_BASIC); 1086 CheckVersion0Pickle(false, PasswordForm::SCHEME_BASIC);
1087 } 1087 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/native_backend_kwallet_x.cc ('k') | chrome/browser/password_manager/password_form_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698