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/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
18 #include "chrome/test/base/testing_pref_service.h" | 18 #include "chrome/test/base/testing_pref_service_syncable.h" |
19 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
20 #include "content/public/browser/navigation_details.h" | 20 #include "content/public/browser/navigation_details.h" |
21 #include "content/public/common/frame_navigate_params.h" | 21 #include "content/public/common/frame_navigate_params.h" |
22 #include "content/public/test/test_browser_thread.h" | 22 #include "content/public/test/test_browser_thread.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 using content::BrowserThread; | 26 using content::BrowserThread; |
27 using content::PasswordForm; | 27 using content::PasswordForm; |
28 using testing::_; | 28 using testing::_; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 // navigation occurs. | 428 // navigation occurs. |
429 EXPECT_CALL(delegate_, | 429 EXPECT_CALL(delegate_, |
430 AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0)); | 430 AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0)); |
431 EXPECT_CALL(*store_, AddLogin(FormMatches(form))); | 431 EXPECT_CALL(*store_, AddLogin(FormMatches(form))); |
432 | 432 |
433 // Now the password manager waits for the navigation to complete. | 433 // Now the password manager waits for the navigation to complete. |
434 observed.clear(); | 434 observed.clear(); |
435 manager()->OnPasswordFormsParsed(observed); // The post-navigation load. | 435 manager()->OnPasswordFormsParsed(observed); // The post-navigation load. |
436 manager()->OnPasswordFormsRendered(observed); // The post-navigation layout. | 436 manager()->OnPasswordFormsRendered(observed); // The post-navigation layout. |
437 } | 437 } |
OLD | NEW |