Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6043)

Unified Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 2189513004: Blink: prevent didAssociateFormControls notification while parsing the document. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/password_manager_browsertest.cc
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 95bb15a61f3eb50c7b5c6d22f2c46af783d3a6e1..11708aff5fe48e4c9c2b3b8e5ac88308ea03bfa8 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -206,6 +206,28 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
}
IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
+ NoPromptIfPasswordFormManagerDestroyed) {
vabr (Chromium) 2016/07/27 14:06:49 Just a note: One thing I'm wary of here is that th
vasilii 2016/07/27 14:26:59 It's actually failing > 50% of the times on my mac
+ NavigateToFile("/password/password_form.html");
+ // Simulate the Credential Manager API essentially destroying all the
+ // PasswordFormManager instances.
+ ChromePasswordManagerClient::FromWebContents(WebContents())
+ ->NotifyStorePasswordCalled();
+
+ // Fill a form and submit through a <input type="submit"> button. The renderer
+ // should not send "PasswordFormsParsed" messages after the page was loaded.
+ NavigationObserver observer(WebContents());
+ std::string fill_and_submit =
+ "document.getElementById('username_field').value = 'temp';"
+ "document.getElementById('password_field').value = 'random';"
+ "document.getElementById('input_submit_button').click()";
+ ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit));
+ observer.Wait();
+ std::unique_ptr<BubbleObserver> prompt_observer(
+ new BubbleObserver(WebContents()));
+ EXPECT_FALSE(prompt_observer->IsShowingSavePrompt());
+}
+
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
PromptForSubmitWithInPageNavigation) {
NavigateToFile("/password/password_navigate_before_submit.html");
« no previous file with comments | « no previous file | chrome/test/base/chrome_render_view_test.cc » ('j') | components/autofill/content/renderer/autofill_agent.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698