| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/base/chrome_render_view_host_test_harness.h" | 5 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 6 #include "components/autofill/content/browser/autofill_driver_impl.h" | 6 #include "components/autofill/content/browser/autofill_driver_impl.h" |
| 7 #include "components/autofill/content/browser/request_autocomplete_manager.h" | 7 #include "components/autofill/content/browser/request_autocomplete_manager.h" |
| 8 #include "components/autofill/content/common/autofill_messages.h" |
| 8 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" | 9 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" |
| 9 #include "components/autofill/core/common/autofill_messages.h" | |
| 10 #include "content/public/test/mock_render_process_host.h" | 10 #include "content/public/test/mock_render_process_host.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace autofill { | 13 namespace autofill { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const char kAppLocale[] = "en-US"; | 17 const char kAppLocale[] = "en-US"; |
| 18 const AutofillManager::AutofillDownloadManagerState kDownloadState = | 18 const AutofillManager::AutofillDownloadManagerState kDownloadState = |
| 19 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER; | 19 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 TEST_F(RequestAutocompleteManagerTest, | 155 TEST_F(RequestAutocompleteManagerTest, |
| 156 OnRequestAutocompleteWithAutocompleteDisabled) { | 156 OnRequestAutocompleteWithAutocompleteDisabled) { |
| 157 blink::WebFormElement::AutocompleteResult result; | 157 blink::WebFormElement::AutocompleteResult result; |
| 158 driver_->mock_autofill_manager()->set_autofill_enabled(false); | 158 driver_->mock_autofill_manager()->set_autofill_enabled(false); |
| 159 request_autocomplete_manager_->OnRequestAutocomplete(FormData(), GURL()); | 159 request_autocomplete_manager_->OnRequestAutocomplete(FormData(), GURL()); |
| 160 EXPECT_TRUE(GetAutocompleteResultMessage(&result)); | 160 EXPECT_TRUE(GetAutocompleteResultMessage(&result)); |
| 161 EXPECT_EQ(result, blink::WebFormElement::AutocompleteResultErrorDisabled); | 161 EXPECT_EQ(result, blink::WebFormElement::AutocompleteResultErrorDisabled); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace autofill | 164 } // namespace autofill |
| OLD | NEW |