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

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

Issue 11636040: AutofillPopupController clarifications + simplifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ilya review Created 8 years 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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 } 1422 }
1423 1423
1424 // Simulate editing an autofilled field. 1424 // Simulate editing an autofilled field.
1425 { 1425 {
1426 EXPECT_CALL(*autofill_manager_->metric_logger(), 1426 EXPECT_CALL(*autofill_manager_->metric_logger(),
1427 LogUserHappinessMetric( 1427 LogUserHappinessMetric(
1428 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD)); 1428 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD));
1429 EXPECT_CALL(*autofill_manager_->metric_logger(), 1429 EXPECT_CALL(*autofill_manager_->metric_logger(),
1430 LogUserHappinessMetric( 1430 LogUserHappinessMetric(
1431 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD_ONCE)); 1431 AutofillMetrics::USER_DID_EDIT_AUTOFILLED_FIELD_ONCE));
1432 AutofillManager::GUIDPair guid("00000000-0000-0000-0000-000000000001", 0); 1432 PersonalDataManager::GUIDPair guid(
1433 AutofillManager::GUIDPair empty(std::string(), 0); 1433 "00000000-0000-0000-0000-000000000001", 0);
1434 PersonalDataManager::GUIDPair empty(std::string(), 0);
1434 autofill_manager_->OnFillAutofillFormData( 1435 autofill_manager_->OnFillAutofillFormData(
1435 0, form, form.fields.front(), 1436 0, form, form.fields.front(),
1436 autofill_manager_->PackGUIDs(empty, guid)); 1437 autofill_manager_->PackGUIDs(empty, guid));
1437 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1438 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1438 TimeTicks()); 1439 TimeTicks());
1439 // Simulate a second keystroke; make sure we don't log the metric twice. 1440 // Simulate a second keystroke; make sure we don't log the metric twice.
1440 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1441 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1441 TimeTicks()); 1442 TimeTicks());
1442 } 1443 }
1443 1444
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1)); 1560 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1));
1560 autofill_manager_->OnDidFillAutofillFormData( 1561 autofill_manager_->OnDidFillAutofillFormData(
1561 TimeTicks::FromInternalValue(5)); 1562 TimeTicks::FromInternalValue(5));
1562 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1563 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1563 TimeTicks::FromInternalValue(3)); 1564 TimeTicks::FromInternalValue(3));
1564 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1565 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1565 autofill_manager_->Reset(); 1566 autofill_manager_->Reset();
1566 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1567 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1567 } 1568 }
1568 } 1569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698