| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "components/autofill/content/browser/wallet/instrument.h" | 29 #include "components/autofill/content/browser/wallet/instrument.h" |
| 30 #include "components/autofill/content/browser/wallet/mock_wallet_client.h" | 30 #include "components/autofill/content/browser/wallet/mock_wallet_client.h" |
| 31 #include "components/autofill/content/browser/wallet/wallet_address.h" | 31 #include "components/autofill/content/browser/wallet/wallet_address.h" |
| 32 #include "components/autofill/content/browser/wallet/wallet_service_url.h" | 32 #include "components/autofill/content/browser/wallet/wallet_service_url.h" |
| 33 #include "components/autofill/content/browser/wallet/wallet_test_util.h" | 33 #include "components/autofill/content/browser/wallet/wallet_test_util.h" |
| 34 #include "components/autofill/core/browser/autofill_common_test.h" | 34 #include "components/autofill/core/browser/autofill_common_test.h" |
| 35 #include "components/autofill/core/browser/autofill_metrics.h" | 35 #include "components/autofill/core/browser/autofill_metrics.h" |
| 36 #include "components/autofill/core/browser/test_personal_data_manager.h" | 36 #include "components/autofill/core/browser/test_personal_data_manager.h" |
| 37 #include "components/autofill/core/common/autofill_switches.h" | 37 #include "components/autofill/core/common/autofill_switches.h" |
| 38 #include "components/autofill/core/common/form_data.h" | 38 #include "components/autofill/core/common/form_data.h" |
| 39 #include "components/user_prefs/user_prefs.h" |
| 39 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
| 40 #include "content/public/test/mock_render_process_host.h" | 41 #include "content/public/test/mock_render_process_host.h" |
| 41 #include "google_apis/gaia/google_service_auth_error.h" | 42 #include "google_apis/gaia/google_service_auth_error.h" |
| 42 #include "testing/gmock/include/gmock/gmock.h" | 43 #include "testing/gmock/include/gmock/gmock.h" |
| 43 #include "testing/gtest/include/gtest/gtest.h" | 44 #include "testing/gtest/include/gtest/gtest.h" |
| 44 | 45 |
| 45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 46 #include "ui/base/win/scoped_ole_initializer.h" | 47 #include "ui/base/win/scoped_ole_initializer.h" |
| 47 #endif | 48 #endif |
| 48 | 49 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 mock_new_card_bubble_controller_(mock_new_card_bubble_controller), | 263 mock_new_card_bubble_controller_(mock_new_card_bubble_controller), |
| 263 submit_button_delay_count_(0) {} | 264 submit_button_delay_count_(0) {} |
| 264 | 265 |
| 265 virtual ~TestAutofillDialogController() {} | 266 virtual ~TestAutofillDialogController() {} |
| 266 | 267 |
| 267 virtual AutofillDialogView* CreateView() OVERRIDE { | 268 virtual AutofillDialogView* CreateView() OVERRIDE { |
| 268 return new testing::NiceMock<TestAutofillDialogView>(); | 269 return new testing::NiceMock<TestAutofillDialogView>(); |
| 269 } | 270 } |
| 270 | 271 |
| 271 void Init(content::BrowserContext* browser_context) { | 272 void Init(content::BrowserContext* browser_context) { |
| 272 test_manager_.Init(browser_context); | 273 test_manager_.Init(browser_context, |
| 274 user_prefs::UserPrefs::Get(browser_context)); |
| 273 } | 275 } |
| 274 | 276 |
| 275 TestAutofillDialogView* GetView() { | 277 TestAutofillDialogView* GetView() { |
| 276 return static_cast<TestAutofillDialogView*>(view()); | 278 return static_cast<TestAutofillDialogView*>(view()); |
| 277 } | 279 } |
| 278 | 280 |
| 279 TestPersonalDataManager* GetTestingManager() { | 281 TestPersonalDataManager* GetTestingManager() { |
| 280 return &test_manager_; | 282 return &test_manager_; |
| 281 } | 283 } |
| 282 | 284 |
| (...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 for (size_t j = 0; j < inputs.size(); ++j) { | 2571 for (size_t j = 0; j < inputs.size(); ++j) { |
| 2570 if (inputs[j].type == CREDIT_CARD_NUMBER) | 2572 if (inputs[j].type == CREDIT_CARD_NUMBER) |
| 2571 EXPECT_FALSE(controller()->InputIsEditable(inputs[j], sections[i])); | 2573 EXPECT_FALSE(controller()->InputIsEditable(inputs[j], sections[i])); |
| 2572 else | 2574 else |
| 2573 EXPECT_TRUE(controller()->InputIsEditable(inputs[j], sections[i])); | 2575 EXPECT_TRUE(controller()->InputIsEditable(inputs[j], sections[i])); |
| 2574 } | 2576 } |
| 2575 } | 2577 } |
| 2576 } | 2578 } |
| 2577 | 2579 |
| 2578 } // namespace autofill | 2580 } // namespace autofill |
| OLD | NEW |