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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent_unittest.cc

Issue 258473005: Add a unittest for PasswordAutofillAgent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698