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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc

Issue 921443003: Fix RenderFrameCreated and RenderFrameDeleted WebContentsObserver methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete pending callbacks in ManifestManagerHost destructor. Created 5 years, 10 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/ui/autofill/autofill_popup_controller_interactive_uitest.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
index 75cdeb1000055be159186f85bdfbf3976e94a110..ca7862210c6aebd9769d6ebb235c0acaa18d73e0 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
@@ -13,6 +13,7 @@
#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/test_autofill_external_delegate.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/test_utils.h"
@@ -42,8 +43,6 @@ class TestAutofillExternalDelegate : public AutofillExternalDelegate {
if (message_loop_runner_.get())
message_loop_runner_->Quit();
-
- AutofillExternalDelegate::OnPopupHidden();
}
void WaitForPopupHidden() {
@@ -90,7 +89,10 @@ class AutofillPopupControllerBrowserTest
// Normally the WebContents will automatically delete the delegate, but here
// the delegate is owned by this test, so we have to manually destroy.
- void WebContentsDestroyed() override { autofill_external_delegate_.reset(); }
+ void RenderFrameDeleted(content::RenderFrameHost* rfh) override {
+ if (!rfh->GetParent())
+ autofill_external_delegate_.reset();
+ }
protected:
scoped_ptr<TestAutofillExternalDelegate> autofill_external_delegate_;

Powered by Google App Engine
This is Rietveld 408576698