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

Side by Side Diff: chrome/renderer/autofill/password_generation_agent_browsertest.cc

Issue 2055693002: Add delay to didAssociateFormControlsTimer so it doesn't fire too frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string.h> 5 #include <string.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 "first_password.id = 'first_password';" 496 "first_password.id = 'first_password';"
497 "first_password.name = 'first_password';" 497 "first_password.name = 'first_password';"
498 "var second_password = document.createElement('input');" 498 "var second_password = document.createElement('input');"
499 "second_password.type = 'password';" 499 "second_password.type = 'password';"
500 "second_password.id = 'second_password';" 500 "second_password.id = 'second_password';"
501 "second_password.name = 'second_password';" 501 "second_password.name = 'second_password';"
502 "form.appendChild(username);" 502 "form.appendChild(username);"
503 "form.appendChild(first_password);" 503 "form.appendChild(first_password);"
504 "form.appendChild(second_password);" 504 "form.appendChild(second_password);"
505 "document.body.appendChild(form);"); 505 "document.body.appendChild(form);");
506 ProcessPendingMessages(); 506 WaitForAutofillDidAssociateFormControl();
507 507
508 // This needs to come after the DOM has been modified. 508 // This needs to come after the DOM has been modified.
509 SetAccountCreationFormsDetectedMessage(password_generation_, 509 SetAccountCreationFormsDetectedMessage(password_generation_,
510 GetMainFrame()->document(), 1, 1); 510 GetMainFrame()->document(), 1, 1);
511 511
512 // TODO(gcasto): I'm slightly worried about flakes in this test where 512 // TODO(gcasto): I'm slightly worried about flakes in this test where
513 // didAssociateFormControls() isn't called. If this turns out to be a problem 513 // didAssociateFormControls() isn't called. If this turns out to be a problem
514 // adding a call to OnDynamicFormsSeen(GetMainFrame()) will fix it, though 514 // adding a call to OnDynamicFormsSeen(GetMainFrame()) will fix it, though
515 // it will weaken the test. 515 // it will weaken the test.
516 ExpectGenerationAvailable("first_password", true); 516 ExpectGenerationAvailable("first_password", true);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 base::string16()); 685 base::string16());
686 } 686 }
687 687
688 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) { 688 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) {
689 LoadHTMLWithUserGesture(kSigninFormHTML); 689 LoadHTMLWithUserGesture(kSigninFormHTML);
690 ExpectFormClassifierVoteReceived(false /* vote is not expected */, 690 ExpectFormClassifierVoteReceived(false /* vote is not expected */,
691 base::string16()); 691 base::string16());
692 } 692 }
693 693
694 } // namespace autofill 694 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/autofill_renderer_browsertest.cc ('k') | chrome/test/base/chrome_render_view_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698