Commit 814a09a3 authored by Vasilii Sukhanov's avatar Vasilii Sukhanov Committed by Commit Bot

Reenable ObsoleteHttpCredentialMovedOnMigrationToHstsSite test.

The problem was that the Mojo callback was destroyed after the pipe. The
fix is to close it a bit earlier than all WebContentsObserver destroyed.

Bug: 1090011
Change-Id: Ibc9406808d7fdd1e7fa1c49a32ca68b15522a74d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224265Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774542}
parent 05364bf3
......@@ -1195,6 +1195,14 @@ void ChromePasswordManagerClient::DidFinishNavigation(
HideFillingUI();
}
void ChromePasswordManagerClient::WebContentsDestroyed() {
// crbug/1090011
// Drop the connection before the WebContentsObserver destructors are invoked.
// Other classes may contain callbacks to the Mojo methods. Those callbacks
// don't like to be destroyed earlier than the pipe itself.
content_credential_manager_.DisconnectBinding();
}
#if !defined(OS_ANDROID)
void ChromePasswordManagerClient::OnPaste() {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
......
......@@ -286,6 +286,7 @@ class ChromePasswordManagerClient
content::NavigationHandle* navigation_handle) override;
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override;
void WebContentsDestroyed() override;
// TODO(crbug.com/1006430): Paste event is not captured on Android.
#if !defined(OS_ANDROID)
void OnPaste() override;
......
......@@ -698,9 +698,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
passwords[www_url.spec()].front().password_value);
}
IN_PROC_BROWSER_TEST_F(
CredentialManagerBrowserTest,
DISABLED_ObsoleteHttpCredentialMovedOnMigrationToHstsSite) {
IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
ObsoleteHttpCredentialMovedOnMigrationToHstsSite) {
// Add an http credential to the password store.
GURL https_origin = https_test_server().base_url();
ASSERT_TRUE(https_origin.SchemeIs(url::kHttpsScheme));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment