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

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

Issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reverted one unneeded change 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 | Annotate | Revision Log
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 "base/synchronization/waitable_event.h"
Ilya Sherman 2012/04/17 21:32:15 nit: Why is this needed?
GeorgeY 2012/04/18 18:14:46 not anymore :). Removed
10 #include "chrome/browser/autofill/autofill_manager.h" 11 #include "chrome/browser/autofill/autofill_manager.h"
11 #include "chrome/browser/autofill/test_autofill_external_delegate.h" 12 #include "chrome/browser/autofill/test_autofill_external_delegate.h"
12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" 13 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
13 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
14 #include "content/test/test_browser_thread.h" 15 #include "content/test/test_browser_thread.h"
15 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 #include "webkit/forms/form_data.h" 19 #include "webkit/forms/form_data.h"
19 #include "webkit/forms/form_field.h" 20 #include "webkit/forms/form_field.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // negative unique id. 132 // negative unique id.
132 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateInvalidUniqueId) { 133 TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateInvalidUniqueId) {
133 // Ensure it doesn't try to preview the negative id. 134 // Ensure it doesn't try to preview the negative id.
134 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0); 135 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0);
135 external_delegate_->SelectAutofillSuggestionAtIndex(-1, 0); 136 external_delegate_->SelectAutofillSuggestionAtIndex(-1, 0);
136 137
137 // Ensure it doesn't try to fill the form in with the negative id. 138 // Ensure it doesn't try to fill the form in with the negative id.
138 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0); 139 EXPECT_CALL(*autofill_manager_, OnFillAutofillFormData(_, _, _, _)).Times(0);
139 external_delegate_->DidAcceptAutofillSuggestions(string16(), -1, 0); 140 external_delegate_->DidAcceptAutofillSuggestions(string16(), -1, 0);
140 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698