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

Unified Diff: chrome/renderer/autofill/password_autofill_agent_browsertest.cc

Issue 1767343004: Replace base::Tuple in //chrome with std::tuple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/typedef/using/ Created 4 years, 9 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/renderer/autofill/password_autofill_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index 129b6f74d2603128639014ecc41708e1d194fdd5..c1c12b2184f07173fabfadfdd38b541e0cb5bf7a 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <tuple>
+
#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -440,13 +442,13 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_ShowPasswordSuggestions::ID);
ASSERT_TRUE(message);
- base::Tuple<int, base::i18n::TextDirection, base::string16, int, gfx::RectF>
+ std::tuple<int, base::i18n::TextDirection, base::string16, int, gfx::RectF>
args;
AutofillHostMsg_ShowPasswordSuggestions::Read(message, &args);
- EXPECT_EQ(kPasswordFillFormDataId, base::get<0>(args));
- EXPECT_EQ(ASCIIToUTF16(username), base::get<2>(args));
+ EXPECT_EQ(kPasswordFillFormDataId, std::get<0>(args));
+ EXPECT_EQ(ASCIIToUTF16(username), std::get<2>(args));
EXPECT_EQ(show_all,
- static_cast<bool>(base::get<3>(args) & autofill::SHOW_ALL));
+ static_cast<bool>(std::get<3>(args) & autofill::SHOW_ALL));
render_thread_->sink().ClearMessages();
}
@@ -459,12 +461,12 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_PasswordFormSubmitted::ID);
ASSERT_TRUE(message);
- base::Tuple<autofill::PasswordForm> args;
+ std::tuple<autofill::PasswordForm> args;
AutofillHostMsg_PasswordFormSubmitted::Read(message, &args);
- EXPECT_EQ(ASCIIToUTF16(username_value), base::get<0>(args).username_value);
- EXPECT_EQ(ASCIIToUTF16(password_value), base::get<0>(args).password_value);
+ EXPECT_EQ(ASCIIToUTF16(username_value), std::get<0>(args).username_value);
+ EXPECT_EQ(ASCIIToUTF16(password_value), std::get<0>(args).password_value);
EXPECT_EQ(ASCIIToUTF16(new_password_value),
- base::get<0>(args).new_password_value);
+ std::get<0>(args).new_password_value);
}
void ExpectInPageNavigationWithUsernameAndPasswords(
@@ -475,12 +477,12 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
render_thread_->sink().GetFirstMessageMatching(
AutofillHostMsg_InPageNavigation::ID);
ASSERT_TRUE(message);
- base::Tuple<autofill::PasswordForm> args;
+ std::tuple<autofill::PasswordForm> args;
AutofillHostMsg_InPageNavigation::Read(message, &args);
- EXPECT_EQ(ASCIIToUTF16(username_value), base::get<0>(args).username_value);
- EXPECT_EQ(ASCIIToUTF16(password_value), base::get<0>(args).password_value);
+ EXPECT_EQ(ASCIIToUTF16(username_value), std::get<0>(args).username_value);
+ EXPECT_EQ(ASCIIToUTF16(password_value), std::get<0>(args).password_value);
EXPECT_EQ(ASCIIToUTF16(new_password_value),
- base::get<0>(args).new_password_value);
+ std::get<0>(args).new_password_value);
}
base::string16 username1_;
@@ -515,7 +517,7 @@ TEST_F(PasswordAutofillAgentTest, InitialAutocomplete) {
AutofillHostMsg_PasswordFormsParsed::ID);
ASSERT_TRUE(msg != NULL);
- base::Tuple1<std::vector<PasswordForm> > forms;
+ std::tuple<std::vector<PasswordForm> > forms;
AutofillHostMsg_PasswordFormsParsed::Read(msg, &forms);
ASSERT_EQ(1U, forms.a.size());
PasswordForm password_form = forms.a[0];
@@ -780,9 +782,9 @@ TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest) {
const IPC::Message* message = render_thread_->sink()
.GetFirstMessageMatching(AutofillHostMsg_PasswordFormsRendered::ID);
EXPECT_TRUE(message);
- base::Tuple<std::vector<autofill::PasswordForm>, bool> param;
+ std::tuple<std::vector<autofill::PasswordForm>, bool> param;
AutofillHostMsg_PasswordFormsRendered::Read(message, &param);
- EXPECT_TRUE(base::get<0>(param).size());
+ EXPECT_TRUE(std::get<0>(param).size());
render_thread_->sink().ClearMessages();
LoadHTML(kEmptyFormHTML);
@@ -790,7 +792,7 @@ TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest) {
AutofillHostMsg_PasswordFormsRendered::ID);
EXPECT_TRUE(message);
AutofillHostMsg_PasswordFormsRendered::Read(message, &param);
- EXPECT_FALSE(base::get<0>(param).size());
+ EXPECT_FALSE(std::get<0>(param).size());
render_thread_->sink().ClearMessages();
LoadHTML(kNonVisibleFormHTML);
@@ -798,7 +800,7 @@ TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest) {
AutofillHostMsg_PasswordFormsRendered::ID);
EXPECT_TRUE(message);
AutofillHostMsg_PasswordFormsRendered::Read(message, &param);
- EXPECT_FALSE(base::get<0>(param).size());
+ EXPECT_FALSE(std::get<0>(param).size());
}
TEST_F(PasswordAutofillAgentTest, SendPasswordFormsTest_Redirection) {

Powered by Google App Engine
This is Rietveld 408576698