| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/password_manager/content/browser/content_credential_manager
_dispatcher.h" | 5 #include "components/password_manager/content/browser/content_credential_manager
_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/password_manager/content/common/credential_manager_messages
.h" | 10 #include "components/password_manager/content/common/credential_manager_messages
.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 } // namespace | 25 } // namespace |
| 26 | 26 |
| 27 namespace password_manager { | 27 namespace password_manager { |
| 28 | 28 |
| 29 class ContentCredentialManagerDispatcherTest | 29 class ContentCredentialManagerDispatcherTest |
| 30 : public content::RenderViewHostTestHarness { | 30 : public content::RenderViewHostTestHarness { |
| 31 public: | 31 public: |
| 32 ContentCredentialManagerDispatcherTest() {} | 32 ContentCredentialManagerDispatcherTest() {} |
| 33 | 33 |
| 34 virtual void SetUp() OVERRIDE { | 34 virtual void SetUp() override { |
| 35 content::RenderViewHostTestHarness::SetUp(); | 35 content::RenderViewHostTestHarness::SetUp(); |
| 36 dispatcher_.reset( | 36 dispatcher_.reset( |
| 37 new ContentCredentialManagerDispatcher(web_contents(), nullptr)); | 37 new ContentCredentialManagerDispatcher(web_contents(), nullptr)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 ContentCredentialManagerDispatcher* dispatcher() { return dispatcher_.get(); } | 40 ContentCredentialManagerDispatcher* dispatcher() { return dispatcher_.get(); } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 scoped_ptr<ContentCredentialManagerDispatcher> dispatcher_; | 43 scoped_ptr<ContentCredentialManagerDispatcher> dispatcher_; |
| 44 }; | 44 }; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 dispatcher()->OnRequestCredential(kRequestId, false, federations); | 88 dispatcher()->OnRequestCredential(kRequestId, false, federations); |
| 89 | 89 |
| 90 const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; | 90 const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; |
| 91 const IPC::Message* message = | 91 const IPC::Message* message = |
| 92 process()->sink().GetFirstMessageMatching(kMsgID); | 92 process()->sink().GetFirstMessageMatching(kMsgID); |
| 93 EXPECT_TRUE(message); | 93 EXPECT_TRUE(message); |
| 94 process()->sink().ClearMessages(); | 94 process()->sink().ClearMessages(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace password_manager | 97 } // namespace password_manager |
| OLD | NEW |