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/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 | 414 |
415 // The enums must be cast to ints to prevent compile errors on linux_rel. | 415 // The enums must be cast to ints to prevent compile errors on linux_rel. |
416 EXPECT_CALL(manager_delegate_, | 416 EXPECT_CALL(manager_delegate_, |
417 ShowAutofillPopup( | 417 ShowAutofillPopup( |
418 _, _, _, _, _, | 418 _, _, _, _, _, |
419 testing::ElementsAre( | 419 testing::ElementsAre( |
420 static_cast<int>( | 420 static_cast<int>( |
421 WebAutofillClient::MenuItemIDPasswordEntry)), | 421 WebAutofillClient::MenuItemIDPasswordEntry)), |
422 _)); | 422 _)); |
423 | 423 |
424 external_delegate_->OnShowPasswordSuggestions(suggestions, | 424 PasswordForm password_form; |
425 realms, | 425 external_delegate_->OnShowPasswordSuggestions( |
426 field, | 426 suggestions, realms, field, password_form, element_bounds); |
427 element_bounds); | |
428 | 427 |
429 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); | 428 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); |
430 | 429 |
431 // This should trigger a call to hide the popup since | 430 // This should trigger a call to hide the popup since |
432 // we've selected an option. | 431 // we've selected an option. |
433 external_delegate_->DidAcceptSuggestion( | 432 external_delegate_->DidAcceptSuggestion( |
434 suggestions[0], | 433 suggestions[0], |
435 WebAutofillClient::MenuItemIDPasswordEntry); | 434 WebAutofillClient::MenuItemIDPasswordEntry); |
436 } | 435 } |
437 | 436 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); | 487 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); |
489 base::string16 dummy_string(ASCIIToUTF16("baz foo")); | 488 base::string16 dummy_string(ASCIIToUTF16("baz foo")); |
490 EXPECT_CALL(*autofill_driver_, | 489 EXPECT_CALL(*autofill_driver_, |
491 RendererShouldSetNodeText(dummy_string)); | 490 RendererShouldSetNodeText(dummy_string)); |
492 external_delegate_->DidAcceptSuggestion( | 491 external_delegate_->DidAcceptSuggestion( |
493 dummy_string, | 492 dummy_string, |
494 WebAutofillClient::MenuItemIDAutocompleteEntry); | 493 WebAutofillClient::MenuItemIDAutocompleteEntry); |
495 } | 494 } |
496 | 495 |
497 } // namespace autofill | 496 } // namespace autofill |
OLD | NEW |