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

Unified Diff: chrome/browser/autofill/autofill_download_unittest.cc

Issue 6931029: Set datapresent string to contain precisely those field types available in stored Autofill data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Signed and delivered Created 9 years, 7 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
« no previous file with comments | « chrome/browser/autofill/autofill_download.cc ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_download_unittest.cc
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc
index 126156841a61798a5d7195b98d3059cf9cdbe407..a98d05a96d524424cbac72537c8af87dc7041e4c 100644
--- a/chrome/browser/autofill/autofill_download_unittest.cc
+++ b/chrome/browser/autofill/autofill_download_unittest.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/autofill/autofill_download.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_metrics.h"
+#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/form_structure.h"
#include "chrome/common/net/test_url_fetcher_factory.h"
#include "chrome/test/test_url_request_context_getter.h"
@@ -215,10 +216,12 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
helper.download_manager.SetNegativeUploadRate(1.0);
// Request with id 1.
EXPECT_TRUE(helper.download_manager.StartUploadRequest(*(form_structures[0]),
- true));
+ true,
+ FieldTypeSet()));
// Request with id 2.
EXPECT_TRUE(helper.download_manager.StartUploadRequest(*(form_structures[1]),
- false));
+ false,
+ FieldTypeSet()));
const char *responses[] = {
"<autofillqueryresponse>"
@@ -290,9 +293,11 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
helper.download_manager.SetNegativeUploadRate(0.0);
// No actual requests for the next two calls, as we set upload rate to 0%.
EXPECT_FALSE(helper.download_manager.StartUploadRequest(*(form_structures[0]),
- true));
+ true,
+ FieldTypeSet()));
EXPECT_FALSE(helper.download_manager.StartUploadRequest(*(form_structures[1]),
- false));
+ false,
+ FieldTypeSet()));
fetcher = factory.GetFetcherByID(3);
EXPECT_EQ(NULL, fetcher);
@@ -338,7 +343,8 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
helper.download_manager.SetPositiveUploadRate(1.0);
// Request with id 4.
EXPECT_TRUE(helper.download_manager.StartUploadRequest(*(form_structures[0]),
- true));
+ true,
+ FieldTypeSet()));
fetcher = factory.GetFetcherByID(4);
ASSERT_TRUE(fetcher);
fetcher->set_backoff_delay(
@@ -354,7 +360,8 @@ TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
// Upload requests should be ignored for the next 10 seconds.
EXPECT_FALSE(helper.download_manager.StartUploadRequest(*(form_structures[0]),
- true));
+ true,
+ FieldTypeSet()));
fetcher = factory.GetFetcherByID(5);
EXPECT_EQ(NULL, fetcher);
« no previous file with comments | « chrome/browser/autofill/autofill_download.cc ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698