OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/password_manager/chrome_password_manager_client.h" | 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "components/sessions/content/content_record_password_state.h" | 37 #include "components/sessions/content/content_record_password_state.h" |
38 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 38 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
39 #include "components/version_info/version_info.h" | 39 #include "components/version_info/version_info.h" |
40 #include "content/public/browser/browser_context.h" | 40 #include "content/public/browser/browser_context.h" |
41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
42 #include "mojo/public/cpp/bindings/binding.h" | 42 #include "mojo/public/cpp/bindings/binding.h" |
43 #include "services/shell/public/cpp/interface_provider.h" | 43 #include "services/shell/public/cpp/interface_provider.h" |
44 #include "testing/gmock/include/gmock/gmock.h" | 44 #include "testing/gmock/include/gmock/gmock.h" |
45 #include "testing/gtest/include/gtest/gtest.h" | 45 #include "testing/gtest/include/gtest/gtest.h" |
46 | 46 |
| 47 using browser_sync::ProfileSyncServiceMock; |
47 using content::BrowserContext; | 48 using content::BrowserContext; |
48 using content::WebContents; | 49 using content::WebContents; |
49 using sessions::GetPasswordStateFromNavigation; | 50 using sessions::GetPasswordStateFromNavigation; |
50 using sessions::SerializedNavigationEntry; | 51 using sessions::SerializedNavigationEntry; |
51 using testing::Return; | 52 using testing::Return; |
52 using testing::_; | 53 using testing::_; |
53 | 54 |
54 namespace { | 55 namespace { |
55 | 56 |
56 const char kPasswordManagerSettingsBehaviourChangeFieldTrialName[] = | 57 const char kPasswordManagerSettingsBehaviourChangeFieldTrialName[] = |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 // State transition: true->false (retains true) | 542 // State transition: true->false (retains true) |
542 TEST_F(ChromePasswordManagerClientTest, AnnotateNavigationEntryTrueToFalse) { | 543 TEST_F(ChromePasswordManagerClientTest, AnnotateNavigationEntryTrueToFalse) { |
543 SetupNavigationForAnnotation(); | 544 SetupNavigationForAnnotation(); |
544 | 545 |
545 GetClient()->AnnotateNavigationEntry(true); | 546 GetClient()->AnnotateNavigationEntry(true); |
546 GetClient()->AnnotateNavigationEntry(false); | 547 GetClient()->AnnotateNavigationEntry(false); |
547 EXPECT_EQ( | 548 EXPECT_EQ( |
548 SerializedNavigationEntry::HAS_PASSWORD_FIELD, | 549 SerializedNavigationEntry::HAS_PASSWORD_FIELD, |
549 GetPasswordStateFromNavigation(*controller().GetLastCommittedEntry())); | 550 GetPasswordStateFromNavigation(*controller().GetLastCommittedEntry())); |
550 } | 551 } |
OLD | NEW |