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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "chrome/browser/autofill/autofill_manager.h" | 10 #include "chrome/browser/autofill/autofill_manager.h" |
11 #include "chrome/browser/autofill/test_autofill_external_delegate.h" | 11 #include "chrome/browser/autofill/test_autofill_external_delegate.h" |
12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
14 #include "content/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" |
18 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
19 #include "webkit/forms/form_data.h" | 19 #include "webkit/forms/form_data.h" |
20 #include "webkit/forms/form_field.h" | 20 #include "webkit/forms/form_field.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 using testing::_; | 23 using testing::_; |
24 using webkit::forms::FormData; | 24 using webkit::forms::FormData; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 external_delegate_->SelectAutofillSuggestionAtIndex(1); | 166 external_delegate_->SelectAutofillSuggestionAtIndex(1); |
167 } | 167 } |
168 | 168 |
169 // Test that the popup is hidden once we are done editing the autofill field. | 169 // Test that the popup is hidden once we are done editing the autofill field. |
170 TEST_F(AutofillExternalDelegateUnitTest, | 170 TEST_F(AutofillExternalDelegateUnitTest, |
171 ExternalDelegateHidePopupAfterEditing) { | 171 ExternalDelegateHidePopupAfterEditing) { |
172 EXPECT_CALL(*external_delegate_, HideAutofillPopup()); | 172 EXPECT_CALL(*external_delegate_, HideAutofillPopup()); |
173 | 173 |
174 external_delegate_->DidEndTextFieldEditing(); | 174 external_delegate_->DidEndTextFieldEditing(); |
175 } | 175 } |
OLD | NEW |