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

Unified Diff: components/autofill/content/browser/content_autofill_driver_unittest.cc

Issue 821453003: Update legacy Tuple-using code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/browser/content_autofill_driver_unittest.cc
diff --git a/components/autofill/content/browser/content_autofill_driver_unittest.cc b/components/autofill/content/browser/content_autofill_driver_unittest.cc
index ffbee128120c67d276711d518461af7f9dba2a61..0ade6e6a63c44b14e40fea0403160e2d35294400 100644
--- a/components/autofill/content/browser/content_autofill_driver_unittest.cc
+++ b/components/autofill/content/browser/content_autofill_driver_unittest.cc
@@ -91,13 +91,13 @@ class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
return false;
- Tuple2<int, FormData> autofill_param;
+ Tuple<int, FormData> autofill_param;
if (!AutofillMsg_FillForm::Read(message, &autofill_param))
return false;
if (page_id)
- *page_id = autofill_param.a;
+ *page_id = get<0>(autofill_param);
if (results)
- *results = autofill_param.b;
+ *results = get<1>(autofill_param);
process()->sink().ClearMessages();
return true;
}
@@ -112,13 +112,13 @@ class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
return false;
- Tuple2<int, FormData> autofill_param;
+ Tuple<int, FormData> autofill_param;
if (!AutofillMsg_PreviewForm::Read(message, &autofill_param))
return false;
if (page_id)
- *page_id = autofill_param.a;
+ *page_id = get<0>(autofill_param);
if (results)
- *results = autofill_param.b;
+ *results = get<1>(autofill_param);
process()->sink().ClearMessages();
return true;
}
@@ -135,12 +135,12 @@ class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
return false;
- Tuple1<std::vector<FormDataPredictions> > autofill_param;
+ Tuple<std::vector<FormDataPredictions> > autofill_param;
if (!AutofillMsg_FieldTypePredictionsAvailable::Read(message,
&autofill_param))
return false;
if (predictions)
- *predictions = autofill_param.a;
+ *predictions = get<0>(autofill_param);
process()->sink().ClearMessages();
return true;
@@ -155,7 +155,7 @@ class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
process()->sink().GetFirstMessageMatching(messageID);
if (!message)
return false;
- Tuple1<base::string16> autofill_param;
+ Tuple<base::string16> autofill_param;
switch (messageID) {
case AutofillMsg_FillFieldWithValue::ID:
if (!AutofillMsg_FillFieldWithValue::Read(message, &autofill_param))
@@ -174,7 +174,7 @@ class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
NOTREACHED();
}
if (value)
- *value = autofill_param.a;
+ *value = get<0>(autofill_param);
process()->sink().ClearMessages();
return true;
}
« no previous file with comments | « chrome/utility/shell_handler_win.h ('k') | components/autofill/content/browser/request_autocomplete_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698