OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/password_manager/mock_password_store.h" | 10 #include "chrome/browser/password_manager/mock_password_store.h" |
11 #include "chrome/browser/password_manager/password_manager.h" | 11 #include "chrome/browser/password_manager/password_manager.h" |
12 #include "chrome/browser/password_manager/password_manager_delegate.h" | 12 #include "chrome/browser/password_manager/password_manager_delegate.h" |
13 #include "chrome/browser/password_manager/password_store.h" | 13 #include "chrome/browser/password_manager/password_store.h" |
14 #include "chrome/browser/password_manager/password_store_factory.h" | 14 #include "chrome/browser/password_manager/password_store_factory.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
18 #include "content/browser/tab_contents/test_tab_contents.h" | |
19 #include "content/public/browser/navigation_details.h" | 18 #include "content/public/browser/navigation_details.h" |
20 #include "content/public/common/frame_navigate_params.h" | 19 #include "content/public/common/frame_navigate_params.h" |
21 #include "content/test/test_browser_thread.h" | 20 #include "content/test/test_browser_thread.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
24 | 23 |
25 using content::BrowserThread; | 24 using content::BrowserThread; |
26 using webkit::forms::PasswordForm; | 25 using webkit::forms::PasswordForm; |
27 using testing::_; | 26 using testing::_; |
28 using testing::DoAll; | 27 using testing::DoAll; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 EXPECT_CALL(*store_, GetLogins(_,_)) | 287 EXPECT_CALL(*store_, GetLogins(_,_)) |
289 .WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(0, result)), Return(0))); | 288 .WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(0, result)), Return(0))); |
290 std::vector<PasswordForm> observed; | 289 std::vector<PasswordForm> observed; |
291 PasswordForm form(MakeSimpleForm()); | 290 PasswordForm form(MakeSimpleForm()); |
292 observed.push_back(form); | 291 observed.push_back(form); |
293 manager()->OnPasswordFormsFound(observed); // The initial load. | 292 manager()->OnPasswordFormsFound(observed); // The initial load. |
294 // PasswordFormsVisible is not called. | 293 // PasswordFormsVisible is not called. |
295 | 294 |
296 manager()->DidStopLoading(); | 295 manager()->DidStopLoading(); |
297 } | 296 } |
OLD | NEW |