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

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

Issue 2007473004: [Autofill] Migrate ContentAutofillDriver<-->AutofillAgent IPCs to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn, gyp, test codes all done Created 4 years, 6 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 0b0876ad841c0e32934bd6b92f8c474fbe9e03ea..783f30a502c62efa11b5015ca3326600dbf43bc3 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -22,6 +22,7 @@
#include "components/autofill/core/common/password_form_field_prediction_map.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "content/public/renderer/render_frame.h"
+#include "mojo/common/common_type_converters.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebVector.h"
@@ -255,14 +256,11 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
}
// Simulates the show initial password account suggestions message being sent
- // to the renderer. We use that so we don't have to make
- // RenderView::OnShowInitialPasswordAccountSuggestions() protected.
+ // to the renderer.
void SimulateOnShowInitialPasswordAccountSuggestions(
const PasswordFormFillData& fill_data) {
- AutofillMsg_ShowInitialPasswordAccountSuggestions msg(
- 0, kPasswordFillFormDataId, fill_data);
- static_cast<content::RenderFrameObserver*>(autofill_agent_)
- ->OnMessageReceived(msg);
+ autofill_agent_->ShowInitialPasswordAccountSuggestions(
+ kPasswordFillFormDataId, fill_data);
}
void SendVisiblePasswordForms() {
@@ -387,9 +385,8 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
static_cast<autofill::PageClickListener*>(autofill_agent_)
->FormControlElementClicked(input, false);
- AutofillMsg_FillPasswordSuggestion msg(0, username, password);
- static_cast<content::RenderFrameObserver*>(autofill_agent_)
- ->OnMessageReceived(msg);
+ autofill_agent_->FillPasswordSuggestion(mojo::String::From(username),
+ mojo::String::From(password));
}
void SimulateUsernameChange(const std::string& username) {

Powered by Google App Engine
This is Rietveld 408576698