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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "components/autofill/core/browser/autofill_manager.h" | 12 #include "components/autofill/core/browser/autofill_manager.h" |
13 #include "components/autofill/core/browser/test_autofill_driver.h" | 13 #include "components/autofill/core/browser/test_autofill_driver.h" |
14 #include "components/autofill/core/browser/test_autofill_external_delegate.h" | 14 #include "components/autofill/core/browser/test_autofill_external_delegate.h" |
15 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" | 15 #include "components/autofill/core/browser/test_autofill_manager_delegate.h" |
16 #include "components/autofill/core/common/form_data.h" | 16 #include "components/autofill/core/common/form_data.h" |
17 #include "components/autofill/core/common/form_field_data.h" | 17 #include "components/autofill/core/common/form_field_data.h" |
18 #include "components/autofill/core/common/password_form_fill_data.h" | 18 #include "components/autofill/core/common/password_form_fill_data.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 21 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
23 | 23 |
| 24 using base::ASCIIToUTF16; |
| 25 using blink::WebAutofillClient; |
24 using testing::_; | 26 using testing::_; |
25 using blink::WebAutofillClient; | |
26 | 27 |
27 namespace autofill { | 28 namespace autofill { |
28 | 29 |
29 namespace { | 30 namespace { |
30 | 31 |
31 // A constant value to use as the Autofill query ID. | 32 // A constant value to use as the Autofill query ID. |
32 const int kQueryId = 5; | 33 const int kQueryId = 5; |
33 | 34 |
34 // A constant value to use as an Autofill profile ID. | 35 // A constant value to use as an Autofill profile ID. |
35 const int kAutofillProfileId = 1; | 36 const int kAutofillProfileId = 1; |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); | 484 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); |
484 base::string16 dummy_string(ASCIIToUTF16("baz foo")); | 485 base::string16 dummy_string(ASCIIToUTF16("baz foo")); |
485 EXPECT_CALL(*autofill_driver_, | 486 EXPECT_CALL(*autofill_driver_, |
486 RendererShouldSetNodeText(dummy_string)); | 487 RendererShouldSetNodeText(dummy_string)); |
487 external_delegate_->DidAcceptSuggestion( | 488 external_delegate_->DidAcceptSuggestion( |
488 dummy_string, | 489 dummy_string, |
489 WebAutofillClient::MenuItemIDAutocompleteEntry); | 490 WebAutofillClient::MenuItemIDAutocompleteEntry); |
490 } | 491 } |
491 | 492 |
492 } // namespace autofill | 493 } // namespace autofill |
OLD | NEW |