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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 <utility> 5 #include <utility>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
14 #include "build/build_config.h" 13 #include "build/build_config.h"
15 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 14 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
16 #include "chrome/browser/ui/passwords/manage_passwords_icon_view.h" 15 #include "chrome/browser/ui/passwords/manage_passwords_icon_view.h"
17 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" 16 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
18 #include "chrome/browser/ui/passwords/password_dialog_controller.h" 17 #include "chrome/browser/ui/passwords/password_dialog_controller.h"
19 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" 18 #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
21 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
22 #include "components/autofill/core/common/password_form.h" 21 #include "components/autofill/core/common/password_form.h"
23 #include "components/password_manager/core/browser/password_bubble_experiment.h" 22 #include "components/password_manager/core/browser/password_bubble_experiment.h"
24 #include "components/password_manager/core/browser/password_form_manager.h" 23 #include "components/password_manager/core/browser/password_form_manager.h"
25 #include "components/password_manager/core/browser/password_manager.h" 24 #include "components/password_manager/core/browser/password_manager.h"
26 #include "components/password_manager/core/browser/statistics_table.h" 25 #include "components/password_manager/core/browser/statistics_table.h"
27 #include "components/password_manager/core/browser/stub_password_manager_client. h" 26 #include "components/password_manager/core/browser/stub_password_manager_client. h"
28 #include "components/password_manager/core/browser/stub_password_manager_driver. h" 27 #include "components/password_manager/core/browser/stub_password_manager_driver. h"
29 #include "components/password_manager/core/common/credential_manager_types.h" 28 #include "components/password_manager/core/common/credential_manager_types.h"
30 #include "components/password_manager/core/common/password_manager_ui.h" 29 #include "components/password_manager/core/common/password_manager_ui.h"
30 #include "components/prefs/pref_service.h"
31 #include "components/variations/variations_associated_data.h" 31 #include "components/variations/variations_associated_data.h"
32 #include "content/public/browser/navigation_details.h" 32 #include "content/public/browser/navigation_details.h"
33 #include "content/public/test/test_browser_thread_bundle.h" 33 #include "content/public/test/test_browser_thread_bundle.h"
34 #include "content/public/test/web_contents_tester.h" 34 #include "content/public/test/web_contents_tester.h"
35 #include "testing/gmock/include/gmock/gmock.h" 35 #include "testing/gmock/include/gmock/gmock.h"
36 #include "testing/gtest/include/gtest/gtest.h" 36 #include "testing/gtest/include/gtest/gtest.h"
37 37
38 using ::testing::DoAll; 38 using ::testing::DoAll;
39 using ::testing::ElementsAre; 39 using ::testing::ElementsAre;
40 using ::testing::Pointee; 40 using ::testing::Pointee;
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 CreateFormManager()); 710 CreateFormManager());
711 controller()->OnUpdatePasswordSubmitted(std::move(test_form_manager)); 711 controller()->OnUpdatePasswordSubmitted(std::move(test_form_manager));
712 EXPECT_EQ(password_manager::ui::PENDING_PASSWORD_UPDATE_STATE, 712 EXPECT_EQ(password_manager::ui::PENDING_PASSWORD_UPDATE_STATE,
713 controller()->GetState()); 713 controller()->GetState());
714 controller()->DidNavigateMainFrame(content::LoadCommittedDetails(), 714 controller()->DidNavigateMainFrame(content::LoadCommittedDetails(),
715 content::FrameNavigateParams()); 715 content::FrameNavigateParams());
716 EXPECT_EQ(password_manager::ui::INACTIVE_STATE, controller()->GetState()); 716 EXPECT_EQ(password_manager::ui::INACTIVE_STATE, controller()->GetState());
717 // The following line shouldn't crash browser. 717 // The following line shouldn't crash browser.
718 controller()->OnNoInteractionOnUpdate(); 718 controller()->OnNoInteractionOnUpdate();
719 } 719 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698