| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 2957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2968 | 2968 |
| 2969 class MockAutofillManagerDelegate : public TestAutofillManagerDelegate { | 2969 class MockAutofillManagerDelegate : public TestAutofillManagerDelegate { |
| 2970 public: | 2970 public: |
| 2971 MockAutofillManagerDelegate() {} | 2971 MockAutofillManagerDelegate() {} |
| 2972 | 2972 |
| 2973 virtual ~MockAutofillManagerDelegate() {} | 2973 virtual ~MockAutofillManagerDelegate() {} |
| 2974 | 2974 |
| 2975 virtual void ShowRequestAutocompleteDialog( | 2975 virtual void ShowRequestAutocompleteDialog( |
| 2976 const FormData& form, | 2976 const FormData& form, |
| 2977 const GURL& source_url, | 2977 const GURL& source_url, |
| 2978 DialogType dialog_type, | |
| 2979 const base::Callback<void(const FormStructure*, | 2978 const base::Callback<void(const FormStructure*, |
| 2980 const std::string&)>& callback) OVERRIDE { | 2979 const std::string&)>& callback) OVERRIDE { |
| 2981 callback.Run(user_supplied_data_.get(), "google_transaction_id"); | 2980 callback.Run(user_supplied_data_.get(), "google_transaction_id"); |
| 2982 } | 2981 } |
| 2983 | 2982 |
| 2984 void SetUserSuppliedData(scoped_ptr<FormStructure> user_supplied_data) { | 2983 void SetUserSuppliedData(scoped_ptr<FormStructure> user_supplied_data) { |
| 2985 user_supplied_data_.reset(user_supplied_data.release()); | 2984 user_supplied_data_.reset(user_supplied_data.release()); |
| 2986 } | 2985 } |
| 2987 | 2986 |
| 2988 private: | 2987 private: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2999 test::CreateTestAddressFormData(&form); | 2998 test::CreateTestAddressFormData(&form); |
| 3000 std::vector<FormData> forms(1, form); | 2999 std::vector<FormData> forms(1, form); |
| 3001 FormsSeen(forms); | 3000 FormsSeen(forms); |
| 3002 const FormFieldData& field = form.fields[0]; | 3001 const FormFieldData& field = form.fields[0]; |
| 3003 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() | 3002 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() |
| 3004 | 3003 |
| 3005 EXPECT_TRUE(external_delegate_->on_query_seen()); | 3004 EXPECT_TRUE(external_delegate_->on_query_seen()); |
| 3006 } | 3005 } |
| 3007 | 3006 |
| 3008 } // namespace autofill | 3007 } // namespace autofill |
| OLD | NEW |