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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/test/histogram_tester.h" | 12 #include "base/test/histogram_tester.h" |
13 #include "components/autofill/core/browser/autofill_manager.h" | 13 #include "components/autofill/core/browser/autofill_manager.h" |
14 #include "components/autofill/core/browser/autofill_metrics.h" | 14 #include "components/autofill/core/browser/autofill_metrics.h" |
15 #include "components/autofill/core/browser/popup_item_ids.h" | 15 #include "components/autofill/core/browser/popup_item_ids.h" |
16 #include "components/autofill/core/browser/suggestion_test_helpers.h" | 16 #include "components/autofill/core/browser/suggestion_test_helpers.h" |
17 #include "components/autofill/core/browser/test_autofill_client.h" | 17 #include "components/autofill/core/browser/test_autofill_client.h" |
18 #include "components/autofill/core/browser/test_autofill_driver.h" | 18 #include "components/autofill/core/browser/test_autofill_driver.h" |
19 #include "components/autofill/core/browser/test_autofill_external_delegate.h" | 19 #include "components/autofill/core/browser/test_autofill_external_delegate.h" |
20 #include "components/autofill/core/common/autofill_switches.h" | 20 #include "components/autofill/core/common/autofill_switches.h" |
21 #include "components/autofill/core/common/form_data.h" | 21 #include "components/autofill/core/common/form_data.h" |
22 #include "components/autofill/core/common/form_field_data.h" | 22 #include "components/autofill/core/common/form_field_data.h" |
23 #include "components/autofill/core/common/password_form_fill_data.h" | 23 #include "components/autofill/core/common/password_form_fill_data.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
27 | 27 |
28 using base::ASCIIToUTF16; | 28 using base::ASCIIToUTF16; |
29 using testing::_; | 29 using testing::_; |
30 | 30 |
31 namespace autofill { | 31 namespace autofill { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // A constant value to use as the Autofill query ID. | 35 // A constant value to use as the Autofill query ID. |
36 const int kQueryId = 5; | 36 const int kQueryId = 5; |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateFillFieldWithValue) { | 535 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateFillFieldWithValue) { |
536 EXPECT_CALL(autofill_client_, HideAutofillPopup()); | 536 EXPECT_CALL(autofill_client_, HideAutofillPopup()); |
537 base::string16 dummy_string(ASCIIToUTF16("baz foo")); | 537 base::string16 dummy_string(ASCIIToUTF16("baz foo")); |
538 EXPECT_CALL(*autofill_driver_, | 538 EXPECT_CALL(*autofill_driver_, |
539 RendererShouldFillFieldWithValue(dummy_string)); | 539 RendererShouldFillFieldWithValue(dummy_string)); |
540 external_delegate_->DidAcceptSuggestion(dummy_string, | 540 external_delegate_->DidAcceptSuggestion(dummy_string, |
541 POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); | 541 POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); |
542 } | 542 } |
543 | 543 |
544 } // namespace autofill | 544 } // namespace autofill |
OLD | NEW |