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

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: Remove the "autocomplete" prefix 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 virtual ~AutofillManagerTest() { 623 virtual ~AutofillManagerTest() {
624 } 624 }
625 625
626 virtual void SetUp() OVERRIDE { 626 virtual void SetUp() OVERRIDE {
627 Profile* profile = new TestingProfile(); 627 Profile* profile = new TestingProfile();
628 browser_context_.reset(profile); 628 browser_context_.reset(profile);
629 PersonalDataManagerFactory::GetInstance()->SetTestingFactory( 629 PersonalDataManagerFactory::GetInstance()->SetTestingFactory(
630 profile, TestPersonalDataManager::Build); 630 profile, TestPersonalDataManager::Build);
631 631
632 ChromeRenderViewHostTestHarness::SetUp(); 632 ChromeRenderViewHostTestHarness::SetUp();
633 TabAutofillManagerDelegate::CreateForWebContents(web_contents()); 633 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents());
634 personal_data_.SetBrowserContext(profile); 634 personal_data_.SetBrowserContext(profile);
635 autofill_manager_ = new TestAutofillManager( 635 autofill_manager_ = new TestAutofillManager(
636 web_contents(), 636 web_contents(),
637 TabAutofillManagerDelegate::FromWebContents(web_contents()), 637 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents()),
638 &personal_data_); 638 &personal_data_);
639 639
640 file_thread_.Start(); 640 file_thread_.Start();
641 } 641 }
642 642
643 virtual void TearDown() OVERRIDE { 643 virtual void TearDown() OVERRIDE {
644 // Order of destruction is important as AutofillManager relies on 644 // Order of destruction is important as AutofillManager relies on
645 // PersonalDataManager to be around when it gets destroyed. Also, a real 645 // PersonalDataManager to be around when it gets destroyed. Also, a real
646 // AutofillManager is tied to the lifetime of the WebContents, so it must 646 // AutofillManager is tied to the lifetime of the WebContents, so it must
647 // be destroyed at the destruction of the WebContents. 647 // be destroyed at the destruction of the WebContents.
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 3237
3238 FormData form; 3238 FormData form;
3239 CreateTestAddressFormData(&form); 3239 CreateTestAddressFormData(&form);
3240 std::vector<FormData> forms(1, form); 3240 std::vector<FormData> forms(1, form);
3241 FormsSeen(forms); 3241 FormsSeen(forms);
3242 const FormFieldData& field = form.fields[0]; 3242 const FormFieldData& field = form.fields[0];
3243 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery() 3243 GetAutofillSuggestions(form, field); // should call the delegate's OnQuery()
3244 3244
3245 autofill_manager_->SetExternalDelegate(NULL); 3245 autofill_manager_->SetExternalDelegate(NULL);
3246 } 3246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698