Chromium Code Reviews| Index: chrome/browser/password_manager/credential_manager_browsertest.cc |
| diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc |
| index 95fad6eca0f5847e780ba6f3c3700cae82fa8bac..1af5a802228ec5ba9d63fb7b4bcb39e3741d4532 100644 |
| --- a/chrome/browser/password_manager/credential_manager_browsertest.cc |
| +++ b/chrome/browser/password_manager/credential_manager_browsertest.cc |
| @@ -162,9 +162,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, |
| EXPECT_TRUE(base::ContainsKey(passwords, www_url.spec())); |
| } |
| -// Flaky. See crbug.com/703305 |
| IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, |
| - DISABLED_ObsoleteHttpCredentialMovedOnMigrationToHstsSite) { |
| + ObsoleteHttpCredentialMovedOnMigrationToHstsSite) { |
| // Add an http credential to the password store. |
| GURL https_origin = https_test_server().base_url(); |
| ASSERT_TRUE(https_origin.SchemeIs(url::kHttpsScheme)); |
| @@ -191,29 +190,12 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, |
| ui_test_utils::NavigateToURL( |
| browser(), https_test_server().GetURL("/password/done.html")); |
| - // Call the API to trigger |get| and |store| and redirect. |
| + // Call the API to trigger the account chooser. |
| ASSERT_TRUE(content::ExecuteScript( |
| RenderViewHost(), "navigator.credentials.get({password: true})")); |
| + BubbleObserver(WebContents()).WaitForAccountChooser(); |
| - // Issue the query for HTTPS credentials. |
| - WaitForPasswordStore(); |
| - |
| - // Realize there are no HTTPS credentials and issue the query for HTTP |
| - // credentials instead. |
| WaitForPasswordStore(); |
|
vabr (Chromium)
2017/03/21 18:46:51
It would still be helpful to comment (in the code)
vasilii
2017/03/22 09:28:58
Done.
|
| - |
| - // Sync with IO thread before continuing. This is necessary, because the |
| - // credential migration triggers a query for the HSTS state which gets |
| - // executed on the IO thread. The actual task is empty, because only the reply |
| - // is relevant. By the time the reply is executed it is guaranteed that the |
| - // migration is completed. |
| - const auto empty_lambda = []() {}; |
| - base::RunLoop run_loop; |
| - content::BrowserThread::PostTaskAndReply(content::BrowserThread::IO, |
| - FROM_HERE, base::Bind(empty_lambda), |
| - run_loop.QuitClosure()); |
| - run_loop.Run(); |
| - |
| // Only HTTPS passwords should be present. |
| EXPECT_TRUE( |
| password_store->stored_passwords().at(http_origin.spec()).empty()); |