OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/account_chooser_dialog_android.h" | 5 #include "chrome/browser/password_manager/account_chooser_dialog_android.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 9 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 autofill::PasswordForm::SCHEME_HTML, | 23 autofill::PasswordForm::SCHEME_HTML, |
24 "http://example.com/", | 24 "http://example.com/", |
25 "http://example.com/origin", | 25 "http://example.com/origin", |
26 "http://example.com/action", | 26 "http://example.com/action", |
27 L"submit_element", | 27 L"submit_element", |
28 L"username_element", | 28 L"username_element", |
29 L"password_element", | 29 L"password_element", |
30 L"", | 30 L"", |
31 L"", | 31 L"", |
32 true, | 32 true, |
33 false, | |
34 1, | 33 1, |
35 }; | 34 }; |
36 | 35 |
37 } // namespace | 36 } // namespace |
38 | 37 |
39 class AccountChooserDialogAndroidTest : public ChromeRenderViewHostTestHarness { | 38 class AccountChooserDialogAndroidTest : public ChromeRenderViewHostTestHarness { |
40 public: | 39 public: |
41 AccountChooserDialogAndroidTest() {} | 40 AccountChooserDialogAndroidTest() {} |
42 ~AccountChooserDialogAndroidTest() override {} | 41 ~AccountChooserDialogAndroidTest() override {} |
43 | 42 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 142 |
144 histogram_tester.ExpectUniqueSample( | 143 histogram_tester.ExpectUniqueSample( |
145 "PasswordManager.AccountChooserDialog", | 144 "PasswordManager.AccountChooserDialog", |
146 password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); | 145 password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); |
147 histogram_tester.ExpectUniqueSample( | 146 histogram_tester.ExpectUniqueSample( |
148 "PasswordManager.AccountChooserDialogMultipleAccounts", | 147 "PasswordManager.AccountChooserDialogMultipleAccounts", |
149 password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); | 148 password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); |
150 histogram_tester.ExpectTotalCount( | 149 histogram_tester.ExpectTotalCount( |
151 "PasswordManager.AccountChooserDialogOneAccount", 0); | 150 "PasswordManager.AccountChooserDialogOneAccount", 0); |
152 } | 151 } |
OLD | NEW |