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

Unified Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 880353002: [Autofill] Log the number of autofill profiles available at form submission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index 3bfc805d9ecbd20cb2381c709fd177810368cd60..40a67517444036efc0a49a02ac0696d25b3a867c 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/histogram_tester.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/autocomplete_history_manager.h"
#include "components/autofill/core/browser/autofill_manager.h"
@@ -687,6 +688,7 @@ class AutofillManagerTest : public testing::Test {
protected:
base::MessageLoop message_loop_;
+ base::HistogramTester histogram_tester_;
TestAutofillClient autofill_client_;
scoped_ptr<MockAutofillDriver> autofill_driver_;
scoped_ptr<TestAutofillManager> autofill_manager_;
@@ -2230,6 +2232,9 @@ TEST_F(AutofillManagerTest, FormSubmitted) {
// filled data.
EXPECT_CALL(personal_data_, SaveImportedProfile(::testing::_)).Times(1);
FormSubmitted(response_data);
+
+ histogram_tester_.ExpectUniqueSample(
+ "Autofill.StoredProfileCountAtAutofillableFormSubmission", 3, 1);
Ilya Sherman 2015/01/29 20:34:52 Please move this test to the autofill_metrics_unit
Mathieu 2015/01/30 15:22:41 Done.
}
// Test that when Autocomplete is enabled and Autofill is disabled,
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698