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

Unified Diff: chrome/renderer/autofill/password_autofill_agent_browsertest.cc

Issue 136003013: PasswordAutofillAgentTest.InlineAutocomplete depends on details of style recalc timing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index f5eed742853dcf79613ca2e49a01e40f566f2c0c..6a64f21860e68749608af881b31522c0596907a7 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -262,11 +262,23 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
if (move_caret_to_end)
username_input.setSelectionRange(username.length(), username.length());
autofill_agent_->textFieldDidChange(username_input);
- // Processing is delayed because of a WebKit bug, see
- // PasswordAutocompleteManager::TextDidChangeInTextField() for details.
+ // Processing is delayed because of a Blink bug:
+ // https://bugs.webkit.org/show_bug.cgi?id=16976
+ // See PasswordAutofillAgent::TextDidChangeInTextField() for details.
+
+ // Autocomplete will trigger a style recalculation when we put up the next
+ // frame, but we don't want to wait that long. Instead, trigger a style
+ // recalcuation manually after TextFieldDidChangeImpl runs.
+ base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
+ &PasswordAutofillAgentTest::LayoutMainFrame, base::Unretained(this)));
+
base::MessageLoop::current()->RunUntilIdle();
}
+ void LayoutMainFrame() {
+ GetMainFrame()->view()->layout();
+ }
+
void SimulateUsernameChange(const std::string& username,
bool move_caret_to_end) {
SimulateUsernameChangeForElement(username, move_caret_to_end,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698