| 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 <memory> |
| 8 #include <utility> | 9 #include <utility> |
| 9 | 10 |
| 10 #include "base/bind.h" | 11 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "base/guid.h" | 15 #include "base/guid.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" | |
| 17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
| 19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_piece.h" | 20 #include "base/strings/string_piece.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "chrome/browser/signin/account_tracker_service_factory.h" | 23 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 24 #include "chrome/browser/signin/signin_manager_factory.h" | 24 #include "chrome/browser/signin/signin_manager_factory.h" |
| 25 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 25 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
| 26 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" | 26 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 // http://crbug.com/227221 | 500 // http://crbug.com/227221 |
| 501 ui::ScopedOleInitializer ole_initializer_; | 501 ui::ScopedOleInitializer ole_initializer_; |
| 502 #endif | 502 #endif |
| 503 | 503 |
| 504 // The controller owns itself. | 504 // The controller owns itself. |
| 505 base::WeakPtr<TestAutofillDialogController> controller_; | 505 base::WeakPtr<TestAutofillDialogController> controller_; |
| 506 | 506 |
| 507 // Returned when the dialog closes successfully. | 507 // Returned when the dialog closes successfully. |
| 508 const FormStructure* form_structure_; | 508 const FormStructure* form_structure_; |
| 509 | 509 |
| 510 scoped_ptr<ScopedTestingLocalState> scoped_local_state_; | 510 std::unique_ptr<ScopedTestingLocalState> scoped_local_state_; |
| 511 }; | 511 }; |
| 512 | 512 |
| 513 } // namespace | 513 } // namespace |
| 514 | 514 |
| 515 TEST_F(AutofillDialogControllerTest, RefuseToShowWithNoAutocompleteAttributes) { | 515 TEST_F(AutofillDialogControllerTest, RefuseToShowWithNoAutocompleteAttributes) { |
| 516 FormFieldData email_field; | 516 FormFieldData email_field; |
| 517 email_field.name = ASCIIToUTF16("email"); | 517 email_field.name = ASCIIToUTF16("email"); |
| 518 FormFieldData cc_field; | 518 FormFieldData cc_field; |
| 519 cc_field.name = ASCIIToUTF16("cc"); | 519 cc_field.name = ASCIIToUTF16("cc"); |
| 520 FormFieldData billing_field; | 520 FormFieldData billing_field; |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 SECTION_SHIPPING, | 1762 SECTION_SHIPPING, |
| 1763 NAME_FULL, | 1763 NAME_FULL, |
| 1764 gfx::NativeView(), | 1764 gfx::NativeView(), |
| 1765 gfx::Rect(), | 1765 gfx::Rect(), |
| 1766 profile.GetRawInfo(NAME_FULL).substr(0, 1), | 1766 profile.GetRawInfo(NAME_FULL).substr(0, 1), |
| 1767 true); | 1767 true); |
| 1768 EXPECT_EQ(NAME_FULL, controller()->popup_input_type()); | 1768 EXPECT_EQ(NAME_FULL, controller()->popup_input_type()); |
| 1769 } | 1769 } |
| 1770 | 1770 |
| 1771 } // namespace autofill | 1771 } // namespace autofill |
| OLD | NEW |