Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate_unittest.cc

Issue 133893004: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 manager_delegate_, 412 manager_delegate_,
413 ShowAutofillPopup( 413 ShowAutofillPopup(
414 _, 414 _,
415 _, 415 _,
416 _, 416 _,
417 _, 417 _,
418 _, 418 _,
419 testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_PASSWORD_ENTRY)), 419 testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_PASSWORD_ENTRY)),
420 _)); 420 _));
421 421
422 PasswordForm password_form;
422 external_delegate_->OnShowPasswordSuggestions(suggestions, 423 external_delegate_->OnShowPasswordSuggestions(suggestions,
423 realms, 424 realms,
424 field, 425 field,
426 password_form,
425 element_bounds); 427 element_bounds);
426 428
427 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); 429 EXPECT_CALL(manager_delegate_, HideAutofillPopup());
428 430
429 // This should trigger a call to hide the popup since 431 // This should trigger a call to hide the popup since
430 // we've selected an option. 432 // we've selected an option.
431 external_delegate_->DidAcceptSuggestion(suggestions[0], 433 external_delegate_->DidAcceptSuggestion(suggestions[0],
432 POPUP_ITEM_ID_PASSWORD_ENTRY); 434 POPUP_ITEM_ID_PASSWORD_ENTRY);
433 } 435 }
434 436
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateSetNodeText) { 484 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateSetNodeText) {
483 EXPECT_CALL(manager_delegate_, HideAutofillPopup()); 485 EXPECT_CALL(manager_delegate_, HideAutofillPopup());
484 base::string16 dummy_string(ASCIIToUTF16("baz foo")); 486 base::string16 dummy_string(ASCIIToUTF16("baz foo"));
485 EXPECT_CALL(*autofill_driver_, 487 EXPECT_CALL(*autofill_driver_,
486 RendererShouldSetNodeText(dummy_string)); 488 RendererShouldSetNodeText(dummy_string));
487 external_delegate_->DidAcceptSuggestion(dummy_string, 489 external_delegate_->DidAcceptSuggestion(dummy_string,
488 POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); 490 POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY);
489 } 491 }
490 492
491 } // namespace autofill 493 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698