OLD | NEW |
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 <components/autofill/core/common/password_form.h> | 5 #include <components/autofill/core/common/password_form.h> |
6 #include "base/feature_list.h" | 6 #include "base/feature_list.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 void TearDown() override { | 321 void TearDown() override { |
322 username_element_.reset(); | 322 username_element_.reset(); |
323 password_element_.reset(); | 323 password_element_.reset(); |
324 ChromeRenderViewTest::TearDown(); | 324 ChromeRenderViewTest::TearDown(); |
325 } | 325 } |
326 | 326 |
327 void RegisterMainFrameRemoteInterfaces() override { | 327 void RegisterMainFrameRemoteInterfaces() override { |
328 // We only use the fake driver for main frame | 328 // We only use the fake driver for main frame |
329 // because our test cases only involve the main frame. | 329 // because our test cases only involve the main frame. |
330 shell::InterfaceProvider* remote_interfaces = | 330 service_manager::InterfaceProvider* remote_interfaces = |
331 view_->GetMainRenderFrame()->GetRemoteInterfaces(); | 331 view_->GetMainRenderFrame()->GetRemoteInterfaces(); |
332 shell::InterfaceProvider::TestApi test_api(remote_interfaces); | 332 service_manager::InterfaceProvider::TestApi test_api(remote_interfaces); |
333 test_api.SetBinderForName( | 333 test_api.SetBinderForName( |
334 mojom::PasswordManagerDriver::Name_, | 334 mojom::PasswordManagerDriver::Name_, |
335 base::Bind(&PasswordAutofillAgentTest::BindPasswordManagerDriver, | 335 base::Bind(&PasswordAutofillAgentTest::BindPasswordManagerDriver, |
336 base::Unretained(this))); | 336 base::Unretained(this))); |
337 | 337 |
338 // Because the test cases only involve the main frame in this test, | 338 // Because the test cases only involve the main frame in this test, |
339 // the fake password client is only used for the main frame. | 339 // the fake password client is only used for the main frame. |
340 content::AssociatedInterfaceProvider* remote_associated_interfaces = | 340 content::AssociatedInterfaceProvider* remote_associated_interfaces = |
341 view_->GetMainRenderFrame()->GetRemoteAssociatedInterfaces(); | 341 view_->GetMainRenderFrame()->GetRemoteAssociatedInterfaces(); |
342 remote_associated_interfaces->OverrideBinderForTesting( | 342 remote_associated_interfaces->OverrideBinderForTesting( |
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2462 SimulateElementClick("confirmpassword"); | 2462 SimulateElementClick("confirmpassword"); |
2463 EXPECT_FALSE(GetCalledShowPasswordSuggestions()); | 2463 EXPECT_FALSE(GetCalledShowPasswordSuggestions()); |
2464 | 2464 |
2465 // But when the user clicks on the autofilled password field again it should | 2465 // But when the user clicks on the autofilled password field again it should |
2466 // still produce a suggestion dropdown. | 2466 // still produce a suggestion dropdown. |
2467 SimulateElementClick("password"); | 2467 SimulateElementClick("password"); |
2468 CheckSuggestions("", false); | 2468 CheckSuggestions("", false); |
2469 } | 2469 } |
2470 | 2470 |
2471 } // namespace autofill | 2471 } // namespace autofill |
OLD | NEW |