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

Side by Side Diff: components/autofill/browser/autofill_metrics_unittest.cc

Issue 15840012: Fix AutofillMetricsTest.QualityMetrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extend Created 7 years, 6 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
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm ('k') | no next file » | 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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 AutofillMetricsTest::~AutofillMetricsTest() { 290 AutofillMetricsTest::~AutofillMetricsTest() {
291 // Order of destruction is important as AutofillManager relies on 291 // Order of destruction is important as AutofillManager relies on
292 // PersonalDataManager to be around when it gets destroyed. 292 // PersonalDataManager to be around when it gets destroyed.
293 autofill_manager_.reset(); 293 autofill_manager_.reset();
294 } 294 }
295 295
296 void AutofillMetricsTest::SetUp() { 296 void AutofillMetricsTest::SetUp() {
297 TestingProfile* profile = new TestingProfile(); 297 TestingProfile* profile = new TestingProfile();
298
299 // Ensure Mac OS X does not pop up a modal dialog for the Address Book.
300 autofill::test::DisableSystemServices(profile);
301
298 profile->CreateRequestContext(); 302 profile->CreateRequestContext();
299 browser_context_.reset(profile); 303 browser_context_.reset(profile);
300 PersonalDataManagerFactory::GetInstance()->SetTestingFactory( profile, NULL); 304 PersonalDataManagerFactory::GetInstance()->SetTestingFactory(profile, NULL);
301 305
302 ChromeRenderViewHostTestHarness::SetUp(); 306 ChromeRenderViewHostTestHarness::SetUp();
303 io_thread_.StartIOThread(); 307 io_thread_.StartIOThread();
304 TabAutofillManagerDelegate::CreateForWebContents(web_contents()); 308 TabAutofillManagerDelegate::CreateForWebContents(web_contents());
305 309
306 personal_data_.reset(new TestPersonalDataManager()); 310 personal_data_.reset(new TestPersonalDataManager());
307 personal_data_->SetBrowserContext(profile); 311 personal_data_->SetBrowserContext(profile);
308 autofill_manager_.reset(new TestAutofillManager( 312 autofill_manager_.reset(new TestAutofillManager(
309 web_contents(), 313 web_contents(),
310 TabAutofillManagerDelegate::FromWebContents(web_contents()), 314 TabAutofillManagerDelegate::FromWebContents(web_contents()),
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 TimeTicks::FromInternalValue(5)); 1568 TimeTicks::FromInternalValue(5));
1565 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1569 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1566 TimeTicks::FromInternalValue(3)); 1570 TimeTicks::FromInternalValue(3));
1567 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1571 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1568 autofill_manager_->Reset(); 1572 autofill_manager_->Reset();
1569 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1573 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1570 } 1574 }
1571 } 1575 }
1572 1576
1573 } // namespace autofill 1577 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698