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/strings/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_syncable.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" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // navigation occurs. | 474 // navigation occurs. |
475 EXPECT_CALL(delegate_, | 475 EXPECT_CALL(delegate_, |
476 AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0)); | 476 AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0)); |
477 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))); | 477 EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))); |
478 | 478 |
479 // Now the password manager waits for the navigation to complete. | 479 // Now the password manager waits for the navigation to complete. |
480 observed.clear(); | 480 observed.clear(); |
481 manager()->OnPasswordFormsParsed(observed); // The post-navigation load. | 481 manager()->OnPasswordFormsParsed(observed); // The post-navigation load. |
482 manager()->OnPasswordFormsRendered(observed); // The post-navigation layout. | 482 manager()->OnPasswordFormsRendered(observed); // The post-navigation layout. |
483 } | 483 } |
OLD | NEW |