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

Side by Side Diff: chrome/test/base/chrome_render_view_test.cc

Issue 1026493002: Allow only a user gesture to trigger autofill popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable user gesture check for tests. Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/base/chrome_render_view_test.h" 5 #include "chrome/test/base/chrome_render_view_test.h"
6 6
7 #include "base/debug/leak_annotations.h" 7 #include "base/debug/leak_annotations.h"
8 #include "chrome/browser/chrome_content_browser_client.h" 8 #include "chrome/browser/chrome_content_browser_client.h"
9 #include "chrome/common/chrome_content_client.h" 9 #include "chrome/common/chrome_content_client.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // RenderFrame doesn't expose its Agent objects, because it has no need to 67 // RenderFrame doesn't expose its Agent objects, because it has no need to
68 // store them directly (they're stored as RenderFrameObserver*). So just 68 // store them directly (they're stored as RenderFrameObserver*). So just
69 // create another set. 69 // create another set.
70 password_autofill_agent_ = 70 password_autofill_agent_ =
71 new autofill::TestPasswordAutofillAgent(view_->GetMainRenderFrame()); 71 new autofill::TestPasswordAutofillAgent(view_->GetMainRenderFrame());
72 password_generation_ = 72 password_generation_ =
73 new autofill::TestPasswordGenerationAgent(view_->GetMainRenderFrame()); 73 new autofill::TestPasswordGenerationAgent(view_->GetMainRenderFrame());
74 autofill_agent_ = 74 autofill_agent_ =
75 new AutofillAgent(view_->GetMainRenderFrame(), password_autofill_agent_, 75 new AutofillAgent(view_->GetMainRenderFrame(), password_autofill_agent_,
76 password_generation_); 76 password_generation_);
77 autofill_agent_->DisableUserGestureCheckForTests();
77 } 78 }
78 79
79 void ChromeRenderViewTest::TearDown() { 80 void ChromeRenderViewTest::TearDown() {
80 #if defined(ENABLE_EXTENSIONS) 81 #if defined(ENABLE_EXTENSIONS)
81 ChromeContentRendererClient* client = 82 ChromeContentRendererClient* client =
82 static_cast<ChromeContentRendererClient*>(content_renderer_client_.get()); 83 static_cast<ChromeContentRendererClient*>(content_renderer_client_.get());
83 client->GetExtensionDispatcherForTest()->OnRenderProcessShutdown(); 84 client->GetExtensionDispatcherForTest()->OnRenderProcessShutdown();
84 #endif 85 #endif
85 86
86 #if defined(LEAK_SANITIZER) 87 #if defined(LEAK_SANITIZER)
(...skipping 20 matching lines...) Expand all
107 extension_dispatcher_delegate_.reset( 108 extension_dispatcher_delegate_.reset(
108 new ChromeExtensionsDispatcherDelegate()); 109 new ChromeExtensionsDispatcherDelegate());
109 client->SetExtensionDispatcherForTest( 110 client->SetExtensionDispatcherForTest(
110 new extensions::Dispatcher(extension_dispatcher_delegate_.get())); 111 new extensions::Dispatcher(extension_dispatcher_delegate_.get()));
111 #endif 112 #endif
112 #if defined(ENABLE_SPELLCHECK) 113 #if defined(ENABLE_SPELLCHECK)
113 client->SetSpellcheck(new SpellCheck()); 114 client->SetSpellcheck(new SpellCheck());
114 #endif 115 #endif
115 return client; 116 return client;
116 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698