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

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

Issue 11968032: Move 'theme' parsing out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed IncognitoAutofillManagerTest unittest Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_pref_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 }; 759 };
760 760
761 class IncognitoAutofillManagerTest : public AutofillManagerTest { 761 class IncognitoAutofillManagerTest : public AutofillManagerTest {
762 public: 762 public:
763 IncognitoAutofillManagerTest() {} 763 IncognitoAutofillManagerTest() {}
764 virtual ~IncognitoAutofillManagerTest() {} 764 virtual ~IncognitoAutofillManagerTest() {}
765 765
766 virtual TestingProfile* CreateProfile() OVERRIDE { 766 virtual TestingProfile* CreateProfile() OVERRIDE {
767 // Create an incognito profile. 767 // Create an incognito profile.
768 TestingProfile::Builder builder; 768 TestingProfile::Builder builder;
769 builder.SetOffTheRecord(); 769 scoped_ptr<TestingProfile> profile = builder.Build();
770 return builder.Build().release(); 770 profile->set_incognito(true);
771 return profile.release();
771 } 772 }
772 }; 773 };
773 774
774 class TestFormStructure : public FormStructure { 775 class TestFormStructure : public FormStructure {
775 public: 776 public:
776 explicit TestFormStructure(const FormData& form) : FormStructure(form) {} 777 explicit TestFormStructure(const FormData& form) : FormStructure(form) {}
777 virtual ~TestFormStructure() {} 778 virtual ~TestFormStructure() {}
778 779
779 void SetFieldTypes(const std::vector<AutofillFieldType>& heuristic_types, 780 void SetFieldTypes(const std::vector<AutofillFieldType>& heuristic_types,
780 const std::vector<AutofillFieldType>& server_types) { 781 const std::vector<AutofillFieldType>& server_types) {
(...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 3216
3216 FormData form; 3217 FormData form;
3217 CreateTestAddressFormData(&form); 3218 CreateTestAddressFormData(&form);
3218 std::vector<FormData> forms(1, form); 3219 std::vector<FormData> forms(1, form);
3219 FormsSeen(forms); 3220 FormsSeen(forms);
3220 const FormFieldData& field = form.fields[0]; 3221 const FormFieldData& field = form.fields[0];
3221 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() 3222 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery()
3222 3223
3223 autofill_manager_->SetExternalDelegate(NULL); 3224 autofill_manager_->SetExternalDelegate(NULL);
3224 } 3225 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_pref_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698