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/common/credential_manager_messages
.h" | 5 #include "components/password_manager/content/common/credential_manager_messages
.h" |
6 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 6 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
7 #include "content/public/test/render_view_test.h" | 7 #include "content/public/test/render_view_test.h" |
8 #include "ipc/ipc_test_sink.h" | 8 #include "ipc/ipc_test_sink.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/platform/WebCredential.h" | 10 #include "third_party/WebKit/public/platform/WebCredential.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 request_id)); | 201 request_id)); |
202 | 202 |
203 scoped_ptr<TestRequestCallbacks> callbacks(new TestRequestCallbacks(this)); | 203 scoped_ptr<TestRequestCallbacks> callbacks(new TestRequestCallbacks(this)); |
204 std::vector<GURL> federations; | 204 std::vector<GURL> federations; |
205 client_->dispatchRequest(false, federations, callbacks.release()); | 205 client_->dispatchRequest(false, federations, callbacks.release()); |
206 | 206 |
207 EXPECT_TRUE(ExtractRequestId(CredentialManagerHostMsg_RequestCredential::ID, | 207 EXPECT_TRUE(ExtractRequestId(CredentialManagerHostMsg_RequestCredential::ID, |
208 request_id)); | 208 request_id)); |
209 | 209 |
210 CredentialInfo info; | 210 CredentialInfo info; |
| 211 info.type = CREDENTIAL_TYPE_LOCAL; |
211 client_->OnSendCredential(request_id, info); | 212 client_->OnSendCredential(request_id, info); |
212 EXPECT_TRUE(callback_succeeded()); | 213 EXPECT_TRUE(callback_succeeded()); |
213 EXPECT_FALSE(callback_errored()); | 214 EXPECT_FALSE(callback_errored()); |
214 } | 215 } |
215 | 216 |
216 } // namespace password_manager | 217 } // namespace password_manager |
OLD | NEW |