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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/password_manager/password_form_manager.h" | 11 #include "chrome/browser/password_manager/password_form_manager.h" |
12 #include "chrome/browser/password_manager/password_manager.h" | 12 #include "chrome/browser/password_manager/password_manager.h" |
13 #include "chrome/browser/password_manager/password_manager_delegate.h" | 13 #include "chrome/browser/password_manager/password_manager_delegate.h" |
14 #include "chrome/browser/password_manager/password_store.h" | 14 #include "chrome/browser/password_manager/password_store.h" |
15 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
16 #include "chrome/browser/password_manager/test_password_store.h" | 16 #include "chrome/browser/password_manager/test_password_store.h" |
17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
18 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
19 #include "content/public/common/password_form.h" | 19 #include "content/public/common/password_form.h" |
20 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 537 |
538 SanitizePossibleUsernames(manager.get(), &credentials); | 538 SanitizePossibleUsernames(manager.get(), &credentials); |
539 | 539 |
540 // SSN, duplicate in |other_possible_usernames| and duplicate of | 540 // SSN, duplicate in |other_possible_usernames| and duplicate of |
541 // |username_value| all removed. | 541 // |username_value| all removed. |
542 expected.clear(); | 542 expected.clear(); |
543 expected.push_back(ASCIIToUTF16("duplicate")); | 543 expected.push_back(ASCIIToUTF16("duplicate")); |
544 expected.push_back(ASCIIToUTF16("random")); | 544 expected.push_back(ASCIIToUTF16("random")); |
545 EXPECT_THAT(credentials.other_possible_usernames, Eq(expected)); | 545 EXPECT_THAT(credentials.other_possible_usernames, Eq(expected)); |
546 } | 546 } |
OLD | NEW |