| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/browsing_data/passwords_counter.h" | 5 #include "chrome/browser/browsing_data/passwords_counter.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/password_manager/password_store_factory.h" | 9 #include "chrome/browser/password_manager/password_store_factory.h" |
| 10 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 10 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
| 13 #include "components/autofill/core/common/password_form.h" | 13 #include "components/autofill/core/common/password_form.h" |
| 14 #include "components/browsing_data/browsing_data_utils.h" | 14 #include "components/browsing_data/core/browsing_data_utils.h" |
| 15 #include "components/browsing_data/pref_names.h" | 15 #include "components/browsing_data/core/pref_names.h" |
| 16 #include "components/prefs/pref_service.h" | 16 #include "components/prefs/pref_service.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 using autofill::PasswordForm; | 20 using autofill::PasswordForm; |
| 21 | 21 |
| 22 class PasswordsCounterTest : public InProcessBrowserTest, | 22 class PasswordsCounterTest : public InProcessBrowserTest, |
| 23 public password_manager::PasswordStore::Observer { | 23 public password_manager::PasswordStore::Observer { |
| 24 public: | 24 public: |
| 25 void SetUpOnMainThread() override { | 25 void SetUpOnMainThread() override { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 SetDeletionPeriodPref(browsing_data::FOUR_WEEKS); | 247 SetDeletionPeriodPref(browsing_data::FOUR_WEEKS); |
| 248 WaitForCounting(); | 248 WaitForCounting(); |
| 249 EXPECT_EQ(3u, GetResult()); | 249 EXPECT_EQ(3u, GetResult()); |
| 250 | 250 |
| 251 SetDeletionPeriodPref(browsing_data::EVERYTHING); | 251 SetDeletionPeriodPref(browsing_data::EVERYTHING); |
| 252 WaitForCounting(); | 252 WaitForCounting(); |
| 253 EXPECT_EQ(4u, GetResult()); | 253 EXPECT_EQ(4u, GetResult()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace | 256 } // namespace |
| OLD | NEW |