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

Unified Diff: chrome/browser/autofill/autocheckout_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: Re-upload... 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autocheckout_manager_unittest.cc
diff --git a/chrome/browser/autofill/autocheckout_manager_unittest.cc b/chrome/browser/autofill/autocheckout_manager_unittest.cc
index de89c81a35a737c08b262c002f2f5a3f405bfeca..832eab5f043fc124292faf179630521db5400252 100644
--- a/chrome/browser/autofill/autocheckout_manager_unittest.cc
+++ b/chrome/browser/autofill/autocheckout_manager_unittest.cc
@@ -23,10 +23,11 @@
using content::BrowserThread;
+namespace autofill {
+
namespace {
-typedef Tuple2<std::vector<FormData>,
- autofill::WebElementDescriptor> AutofillParam;
+typedef Tuple2<std::vector<FormData>, WebElementDescriptor> AutofillParam;
FormFieldData BuildFieldWithValue(
const std::string& autocomplete_attribute,
@@ -129,7 +130,7 @@ scoped_ptr<FormStructure> FakeUserSubmittedFormStructure() {
return form_structure.Pass();
}
-class TestAutofillManagerDelegate : public autofill::AutofillManagerDelegate {
+class TestAutofillManagerDelegate : public AutofillManagerDelegate {
public:
explicit TestAutofillManagerDelegate(
content::BrowserContext* browser_context)
@@ -173,13 +174,15 @@ class TestAutofillManagerDelegate : public autofill::AutofillManagerDelegate {
virtual void ShowPasswordGenerationBubble(
const gfx::Rect& bounds,
const content::PasswordForm& form,
- autofill::PasswordGenerator* generator) OVERRIDE {
+ PasswordGenerator* generator) OVERRIDE {
}
virtual void ShowRequestAutocompleteDialog(
const FormData& form,
const GURL& source_url,
const content::SSLStatus& ssl_status,
+ const AutofillMetrics& metric_logger,
+ DialogType dialog_type,
const base::Callback<void(const FormStructure*)>& callback) OVERRIDE {
}
@@ -193,7 +196,7 @@ class TestAutofillManagerDelegate : public autofill::AutofillManagerDelegate {
class TestAutofillManager : public AutofillManager {
public:
explicit TestAutofillManager(content::WebContents* contents,
- autofill::AutofillManagerDelegate* delegate)
+ AutofillManagerDelegate* delegate)
: AutofillManager(contents, delegate, NULL) {
}
@@ -210,6 +213,7 @@ class TestAutofillManager : public AutofillManager {
const FormData& form,
const GURL& source_url,
const content::SSLStatus& ssl_status,
+ DialogType dialog_type,
const base::Callback<void(const FormStructure*)>& callback) OVERRIDE {
callback.Run(user_supplied_data_.get());
}
@@ -272,7 +276,7 @@ TEST_F(AutocheckoutManagerTest, TestFillForms) {
// Simulate the user submitting some data via the requestAutocomplete UI.
autofill_manager_->SetUserSuppliedData(FakeUserSubmittedFormStructure());
autocheckout_manager_->SetProceedElementDescriptor(
- autofill::WebElementDescriptor());
+ WebElementDescriptor());
GURL frame_url;
content::SSLStatus ssl_status;
autocheckout_manager_->ShowAutocheckoutDialog(frame_url, ssl_status);
@@ -297,7 +301,7 @@ TEST_F(AutocheckoutManagerTest, TestFillForms) {
// Test if autocheckout manager can fill form on second page.
autofill_manager_->SetFormStructure(CreateTestCreditCardFormStructure());
autocheckout_manager_->SetProceedElementDescriptor(
- autofill::WebElementDescriptor());
+ WebElementDescriptor());
autocheckout_manager_->FillForms();
@@ -315,3 +319,5 @@ TEST_F(AutocheckoutManagerTest, TestFillForms) {
EXPECT_EQ(ASCIIToUTF16("United States"), filled_forms[0].fields[8].value);
EXPECT_EQ(ASCIIToUTF16("49012"), filled_forms[0].fields[9].value);
}
+
+} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698