| OLD | NEW | 
|     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 <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/scoped_ptr.h" |     9 #include "base/memory/scoped_ptr.h" | 
|    10 #include "base/memory/scoped_vector.h" |    10 #include "base/memory/scoped_vector.h" | 
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   699  |   699  | 
|   700   virtual void TearDown() OVERRIDE { |   700   virtual void TearDown() OVERRIDE { | 
|   701     // Order of destruction is important as AutofillManager relies on |   701     // Order of destruction is important as AutofillManager relies on | 
|   702     // PersonalDataManager to be around when it gets destroyed. Also, a real |   702     // PersonalDataManager to be around when it gets destroyed. Also, a real | 
|   703     // AutofillManager is tied to the lifetime of the WebContents, so it must |   703     // AutofillManager is tied to the lifetime of the WebContents, so it must | 
|   704     // be destroyed at the destruction of the WebContents. |   704     // be destroyed at the destruction of the WebContents. | 
|   705     autofill_manager_.reset(); |   705     autofill_manager_.reset(); | 
|   706     file_thread_.Stop(); |   706     file_thread_.Stop(); | 
|   707     ChromeRenderViewHostTestHarness::TearDown(); |   707     ChromeRenderViewHostTestHarness::TearDown(); | 
|   708     io_thread_.Stop(); |   708     io_thread_.Stop(); | 
 |   709  | 
 |   710     // Remove the BrowserContext so TestPersonalDataManager does not need to | 
 |   711     // care about removing self as an observer in destruction. | 
 |   712     personal_data_.SetBrowserContext(NULL); | 
|   709   } |   713   } | 
|   710  |   714  | 
|   711   virtual TestingProfile* CreateProfile() { |   715   virtual TestingProfile* CreateProfile() { | 
|   712     return new TestingProfile(); |   716     return new TestingProfile(); | 
|   713   } |   717   } | 
|   714  |   718  | 
|   715   void UpdatePasswordGenerationState(bool new_renderer) { |   719   void UpdatePasswordGenerationState(bool new_renderer) { | 
|   716     autofill_manager_->UpdatePasswordGenerationState(NULL, new_renderer); |   720     autofill_manager_->UpdatePasswordGenerationState(NULL, new_renderer); | 
|   717   } |   721   } | 
|   718  |   722  | 
| (...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3336  |  3340  | 
|  3337   FormData form; |  3341   FormData form; | 
|  3338   CreateTestAddressFormData(&form); |  3342   CreateTestAddressFormData(&form); | 
|  3339   std::vector<FormData> forms(1, form); |  3343   std::vector<FormData> forms(1, form); | 
|  3340   FormsSeen(forms); |  3344   FormsSeen(forms); | 
|  3341   const FormFieldData& field = form.fields[0]; |  3345   const FormFieldData& field = form.fields[0]; | 
|  3342   GetAutofillSuggestions(form, field);  // should call the delegate's OnQuery() |  3346   GetAutofillSuggestions(form, field);  // should call the delegate's OnQuery() | 
|  3343  |  3347  | 
|  3344   autofill_manager_->SetExternalDelegate(NULL); |  3348   autofill_manager_->SetExternalDelegate(NULL); | 
|  3345 } |  3349 } | 
| OLD | NEW |