OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/autofill/content/common/autofill_messages.h" |
| 6 #include "components/autofill/content/renderer/test_password_autofill_agent.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace autofill { |
| 10 |
| 11 TEST(PasswordAutofillAgentTest, OnChangeLoggingState) { |
| 12 TestPasswordAutofillAgent agent(NULL); |
| 13 IPC::Listener* const agent_listener(&agent); |
| 14 |
| 15 EXPECT_FALSE(agent.logging_state_active()); |
| 16 |
| 17 AutofillMsg_ChangeLoggingState msg_activate(0, true); |
| 18 EXPECT_TRUE(agent_listener->OnMessageReceived(msg_activate)); |
| 19 EXPECT_TRUE(agent.logging_state_active()); |
| 20 |
| 21 AutofillMsg_ChangeLoggingState msg_deactivate(0, false); |
| 22 EXPECT_TRUE(agent_listener->OnMessageReceived(msg_deactivate)); |
| 23 EXPECT_FALSE(agent.logging_state_active()); |
| 24 } |
| 25 |
| 26 } // namespace autofill |
OLD | NEW |