|
21 | 21 | #include "brave/browser/ui/brave_browser.h"
|
22 | 22 | #include "brave/components/brave_rewards/browser/rewards_service_impl.h"
|
23 | 23 | #include "brave/components/playlist/common/buildflags/buildflags.h"
|
| 24 | +#include "chrome/browser/password_manager/password_store_factory.h" |
24 | 25 | #include "chrome/browser/profiles/profile.h"
|
25 | 26 | #include "chrome/browser/ui/browser.h"
|
26 | 27 | #include "chrome/test/base/in_process_browser_test.h"
|
@@ -300,6 +301,19 @@ IN_PROC_BROWSER_TEST_F(BraveNetworkAuditTest, BasicTests) {
|
300 | 301 | ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL("brave://welcome")));
|
301 | 302 | WaitForTimeout(kMaxTimeoutPerLoadedURL);
|
302 | 303 |
|
| 304 | + // Add a password to the password manager. |
| 305 | + password_manager::PasswordStoreInterface* password_store = |
| 306 | + PasswordStoreFactory::GetForProfile(browser()->profile(), |
| 307 | + ServiceAccessType::IMPLICIT_ACCESS) |
| 308 | + .get(); |
| 309 | + password_manager::PasswordForm signin_form; |
| 310 | + signin_form.signon_realm = "https://www.facebook.com/"; |
| 311 | + signin_form.url = GURL("https://www.facebook.com/"); |
| 312 | + signin_form.action = GURL("https://www.facebook.com/"); |
| 313 | + signin_form.username_value = u"john"; |
| 314 | + signin_form.password_value = u"password1"; |
| 315 | + password_store->AddLogin(signin_form); |
| 316 | + |
303 | 317 | // Load the NTP to check requests made from the JS widgets.
|
304 | 318 | ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL("brave://newtab")));
|
305 | 319 | WaitForTimeout(kMaxTimeoutPerLoadedURL);
|
|
0 commit comments