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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate_unittest.cc

Issue 10073018: Add Delete Support to New Autofill UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 (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"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // we've selected an option. 125 // we've selected an option.
126 external_delegate_->DidAcceptAutofillSuggestions(autofill_item[0], 126 external_delegate_->DidAcceptAutofillSuggestions(autofill_item[0],
127 autofill_ids[0], 0); 127 autofill_ids[0], 0);
128 } 128 }
129 129
130 // Test that the Autofill delegate doesn't try and fill a form with a 130 // Test that the Autofill delegate doesn't try and fill a form with a
131 // negative unique id. 131 // negative unique id.
132 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateInvalidUniqueId) { 132 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateInvalidUniqueId) {
133 // Ensure it doesn't try to preview the negative id. 133 // Ensure it doesn't try to preview the negative id.
134 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0); 134 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0);
135 external_delegate_->SelectAutofillSuggestionAtIndex(-1, 0); 135 external_delegate_->SelectAutofillSuggestionAtIndex(-1);
136 136
137 // Ensure it doesn't try to fill the form in with the negative id. 137 // Ensure it doesn't try to fill the form in with the negative id.
138 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0); 138 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0);
139 external_delegate_->DidAcceptAutofillSuggestions(string16(), -1, 0); 139 external_delegate_->DidAcceptAutofillSuggestions(string16(), -1, 0);
140 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698