| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
| 33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 34 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
| 35 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 35 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 36 #include "chrome/test/base/scoped_testing_local_state.h" | 36 #include "chrome/test/base/scoped_testing_local_state.h" |
| 37 #include "chrome/test/base/testing_browser_process.h" | 37 #include "chrome/test/base/testing_browser_process.h" |
| 38 #include "chrome/test/base/testing_profile.h" | 38 #include "chrome/test/base/testing_profile.h" |
| 39 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" | 39 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" |
| 40 #include "components/autofill/core/browser/autofill_metrics.h" | 40 #include "components/autofill/core/browser/autofill_metrics.h" |
| 41 #include "components/autofill/core/browser/autofill_test_utils.h" | 41 #include "components/autofill/core/browser/autofill_test_utils.h" |
| 42 #include "components/autofill/core/browser/country_names.h" |
| 42 #include "components/autofill/core/browser/test_personal_data_manager.h" | 43 #include "components/autofill/core/browser/test_personal_data_manager.h" |
| 43 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 44 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 44 #include "components/autofill/core/common/autofill_pref_names.h" | 45 #include "components/autofill/core/common/autofill_pref_names.h" |
| 45 #include "components/autofill/core/common/autofill_switches.h" | 46 #include "components/autofill/core/common/autofill_switches.h" |
| 46 #include "components/autofill/core/common/form_data.h" | 47 #include "components/autofill/core/common/form_data.h" |
| 47 #include "components/bookmarks/common/bookmark_pref_names.h" | 48 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 48 #include "components/signin/core/browser/account_tracker_service.h" | 49 #include "components/signin/core/browser/account_tracker_service.h" |
| 49 #include "components/signin/core/browser/signin_manager.h" | 50 #include "components/signin/core/browser/signin_manager.h" |
| 50 #include "components/user_prefs/user_prefs.h" | 51 #include "components/user_prefs/user_prefs.h" |
| 51 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 MockNewCreditCardBubbleController* mock_new_card_bubble_controller_; | 307 MockNewCreditCardBubbleController* mock_new_card_bubble_controller_; |
| 307 | 308 |
| 308 // The number of times that the submit button was delayed. | 309 // The number of times that the submit button was delayed. |
| 309 int submit_button_delay_count_; | 310 int submit_button_delay_count_; |
| 310 | 311 |
| 311 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogController); | 312 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogController); |
| 312 }; | 313 }; |
| 313 | 314 |
| 314 class AutofillDialogControllerTest : public ChromeRenderViewHostTestHarness { | 315 class AutofillDialogControllerTest : public ChromeRenderViewHostTestHarness { |
| 315 protected: | 316 protected: |
| 316 AutofillDialogControllerTest(): form_structure_(NULL) {} | 317 AutofillDialogControllerTest() : form_structure_(NULL) { |
| 318 CountryNames::SetLocaleString("en-US"); |
| 319 } |
| 317 | 320 |
| 318 // testing::Test implementation: | 321 // testing::Test implementation: |
| 319 void SetUp() override { | 322 void SetUp() override { |
| 320 ChromeRenderViewHostTestHarness::SetUp(); | 323 ChromeRenderViewHostTestHarness::SetUp(); |
| 321 Reset(); | 324 Reset(); |
| 322 } | 325 } |
| 323 | 326 |
| 324 void TearDown() override { | 327 void TearDown() override { |
| 325 if (controller_) | 328 if (controller_) |
| 326 controller_->ViewClosed(); | 329 controller_->ViewClosed(); |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 SECTION_SHIPPING, | 1834 SECTION_SHIPPING, |
| 1832 NAME_FULL, | 1835 NAME_FULL, |
| 1833 gfx::NativeView(), | 1836 gfx::NativeView(), |
| 1834 gfx::Rect(), | 1837 gfx::Rect(), |
| 1835 profile.GetRawInfo(NAME_FULL).substr(0, 1), | 1838 profile.GetRawInfo(NAME_FULL).substr(0, 1), |
| 1836 true); | 1839 true); |
| 1837 EXPECT_EQ(NAME_FULL, controller()->popup_input_type()); | 1840 EXPECT_EQ(NAME_FULL, controller()->popup_input_type()); |
| 1838 } | 1841 } |
| 1839 | 1842 |
| 1840 } // namespace autofill | 1843 } // namespace autofill |
| OLD | NEW |