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

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

Issue 12091086: [Autofill] Add UMA timing metrics for requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder 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 | 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 <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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 626
627 virtual void SetUp() OVERRIDE { 627 virtual void SetUp() OVERRIDE {
628 TestingProfile* profile = CreateProfile(); 628 TestingProfile* profile = CreateProfile();
629 profile->CreateRequestContext(); 629 profile->CreateRequestContext();
630 browser_context_.reset(profile); 630 browser_context_.reset(profile);
631 PersonalDataManagerFactory::GetInstance()->SetTestingFactory( 631 PersonalDataManagerFactory::GetInstance()->SetTestingFactory(
632 profile, TestPersonalDataManager::Build); 632 profile, TestPersonalDataManager::Build);
633 633
634 ChromeRenderViewHostTestHarness::SetUp(); 634 ChromeRenderViewHostTestHarness::SetUp();
635 io_thread_.StartIOThread(); 635 io_thread_.StartIOThread();
636 TabAutofillManagerDelegate::CreateForWebContents(web_contents()); 636 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents());
637 personal_data_.SetBrowserContext(profile); 637 personal_data_.SetBrowserContext(profile);
638 autofill_manager_ = new TestAutofillManager( 638 autofill_manager_ = new TestAutofillManager(
639 web_contents(), 639 web_contents(),
640 TabAutofillManagerDelegate::FromWebContents(web_contents()), 640 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents()),
641 &personal_data_); 641 &personal_data_);
642 642
643 file_thread_.Start(); 643 file_thread_.Start();
644 } 644 }
645 645
646 virtual void TearDown() OVERRIDE { 646 virtual void TearDown() OVERRIDE {
647 // Order of destruction is important as AutofillManager relies on 647 // Order of destruction is important as AutofillManager relies on
648 // PersonalDataManager to be around when it gets destroyed. Also, a real 648 // PersonalDataManager to be around when it gets destroyed. Also, a real
649 // AutofillManager is tied to the lifetime of the WebContents, so it must 649 // AutofillManager is tied to the lifetime of the WebContents, so it must
650 // be destroyed at the destruction of the WebContents. 650 // be destroyed at the destruction of the WebContents.
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 3222
3223 FormData form; 3223 FormData form;
3224 CreateTestAddressFormData(&form); 3224 CreateTestAddressFormData(&form);
3225 std::vector<FormData> forms(1, form); 3225 std::vector<FormData> forms(1, form);
3226 FormsSeen(forms); 3226 FormsSeen(forms);
3227 const FormFieldData& field = form.fields[0]; 3227 const FormFieldData& field = form.fields[0];
3228 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() 3228 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery()
3229 3229
3230 autofill_manager_->SetExternalDelegate(NULL); 3230 autofill_manager_->SetExternalDelegate(NULL);
3231 } 3231 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager_delegate.h ('k') | chrome/browser/autofill/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698