OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace autofill { | 39 namespace autofill { |
40 | 40 |
41 class PasswordGenerationAgentTest : public ChromeRenderViewTest { | 41 class PasswordGenerationAgentTest : public ChromeRenderViewTest { |
42 public: | 42 public: |
43 PasswordGenerationAgentTest() {} | 43 PasswordGenerationAgentTest() {} |
44 | 44 |
45 void RegisterMainFrameRemoteInterfaces() override { | 45 void RegisterMainFrameRemoteInterfaces() override { |
46 // We only use the fake driver for main frame | 46 // We only use the fake driver for main frame |
47 // because our test cases only involve the main frame. | 47 // because our test cases only involve the main frame. |
48 shell::InterfaceProvider* remote_interfaces = | 48 service_manager::InterfaceProvider* remote_interfaces = |
49 view_->GetMainRenderFrame()->GetRemoteInterfaces(); | 49 view_->GetMainRenderFrame()->GetRemoteInterfaces(); |
50 shell::InterfaceProvider::TestApi test_api(remote_interfaces); | 50 service_manager::InterfaceProvider::TestApi test_api(remote_interfaces); |
51 test_api.SetBinderForName( | 51 test_api.SetBinderForName( |
52 mojom::PasswordManagerDriver::Name_, | 52 mojom::PasswordManagerDriver::Name_, |
53 base::Bind(&PasswordGenerationAgentTest::BindPasswordManagerDriver, | 53 base::Bind(&PasswordGenerationAgentTest::BindPasswordManagerDriver, |
54 base::Unretained(this))); | 54 base::Unretained(this))); |
55 | 55 |
56 // Because the test cases only involve the main frame in this test, | 56 // Because the test cases only involve the main frame in this test, |
57 // the fake password client is only used for the main frame. | 57 // the fake password client is only used for the main frame. |
58 content::AssociatedInterfaceProvider* remote_associated_interfaces = | 58 content::AssociatedInterfaceProvider* remote_associated_interfaces = |
59 view_->GetMainRenderFrame()->GetRemoteAssociatedInterfaces(); | 59 view_->GetMainRenderFrame()->GetRemoteAssociatedInterfaces(); |
60 remote_associated_interfaces->OverrideBinderForTesting( | 60 remote_associated_interfaces->OverrideBinderForTesting( |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 base::string16()); | 717 base::string16()); |
718 } | 718 } |
719 | 719 |
720 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) { | 720 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) { |
721 LoadHTMLWithUserGesture(kSigninFormHTML); | 721 LoadHTMLWithUserGesture(kSigninFormHTML); |
722 ExpectFormClassifierVoteReceived(false /* vote is not expected */, | 722 ExpectFormClassifierVoteReceived(false /* vote is not expected */, |
723 base::string16()); | 723 base::string16()); |
724 } | 724 } |
725 | 725 |
726 } // namespace autofill | 726 } // namespace autofill |
OLD | NEW |