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

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

Issue 796493004: Remove FrameDetached and FrameWillClose listeners from AutofillAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix init order Created 5 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
Index: chrome/renderer/autofill/autofill_renderer_browsertest.cc
diff --git a/chrome/renderer/autofill/autofill_renderer_browsertest.cc b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
index 47d8066fc81aae398dde0878efd1becde277c28f..49a836650042d691f806b7f5a4ac62ecccb835db 100644
--- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -366,51 +366,6 @@ class RequestAutocompleteRendererTest : public AutofillRendererTest {
DISALLOW_COPY_AND_ASSIGN(RequestAutocompleteRendererTest);
};
-TEST_F(RequestAutocompleteRendererTest, SiblingNavigateIgnored) {
- // Pretend that a sibling frame navigated. No cancel should be sent.
- NavigateFrame(sibling_frame());
- EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_CancelRequestAutocomplete::ID));
-}
-
-TEST_F(RequestAutocompleteRendererTest, SubframeNavigateCancels) {
- // Pretend that the invoking frame navigated. A cancel should be sent.
- NavigateFrame(invoking_frame());
- EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_CancelRequestAutocomplete::ID));
-}
-
-TEST_F(RequestAutocompleteRendererTest, MainFrameNavigateCancels) {
- // Pretend that the top-level frame navigated. A cancel should be sent.
- NavigateFrame(GetMainFrame());
- EXPECT_TRUE(render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_CancelRequestAutocomplete::ID));
-}
-
-TEST_F(RequestAutocompleteRendererTest, NoCancelOnSubframeNavigateAfterDone) {
- // Pretend that the dialog was cancelled.
- SimulateRequestAutocompleteResult(
- invoking_frame_, WebFormElement::AutocompleteResultErrorCancel,
- base::ASCIIToUTF16("Print me to the console"));
-
- // Additional navigations should not crash nor send cancels.
- NavigateFrame(invoking_frame());
- EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_CancelRequestAutocomplete::ID));
-}
-
-TEST_F(RequestAutocompleteRendererTest, NoCancelOnMainFrameNavigateAfterDone) {
- // Pretend that the dialog was cancelled.
- SimulateRequestAutocompleteResult(
- invoking_frame_, WebFormElement::AutocompleteResultErrorCancel,
- base::ASCIIToUTF16("Print me to the console"));
-
- // Additional navigations should not crash nor send cancels.
- NavigateFrame(GetMainFrame());
- EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
- AutofillHostMsg_CancelRequestAutocomplete::ID));
-}
-
TEST_F(RequestAutocompleteRendererTest, InvokingTwiceOnlyShowsOnce) {
// Attempting to show the requestAutocomplete dialog again should be ignored.
invoking_frame_->autofillClient()->didRequestAutocomplete(invoking_form());
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | components/autofill/content/browser/content_autofill_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698