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

Unified Diff: chrome/renderer/render_view_browsertest.cc

Issue 6151011: Introduce RenderView::Observer interface so that RenderView doesn't have to k... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/renderer/render_view.cc ('k') | chrome/renderer/render_view_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view_browsertest.cc
===================================================================
--- chrome/renderer/render_view_browsertest.cc (revision 71253)
+++ chrome/renderer/render_view_browsertest.cc (working copy)
@@ -13,6 +13,7 @@
#include "chrome/common/native_web_keyboard_event.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
+#include "chrome/renderer/autofill_helper.h"
#include "chrome/renderer/print_web_view_helper.h"
#include "chrome/test/render_view_test.h"
#include "gfx/codec/jpeg_codec.h"
@@ -1025,7 +1026,7 @@
// Verify that "FormsSeen" sends the expected number of fields.
ProcessPendingMessages();
- const IPC::Message* message = render_thread_.sink().GetUniqueMessageMatching(
+ const IPC::Message* message = render_thread_.sink().GetFirstMessageMatching(
ViewHostMsg_FormsSeen::ID);
ASSERT_NE(static_cast<IPC::Message*>(NULL), message);
ViewHostMsg_FormsSeen::Param params;
@@ -1065,11 +1066,12 @@
// Accept suggestion that contains a label. Labeled items indicate AutoFill
// as opposed to Autocomplete. We're testing this distinction below with
// the |ViewHostMsg_FillAutoFillFormData::ID| message.
- view_->didAcceptAutoFillSuggestion(firstname,
- WebKit::WebString::fromUTF8("Johnny"),
- WebKit::WebString::fromUTF8("Home"),
- 1,
- -1);
+ autofill_helper_->didAcceptAutoFillSuggestion(
+ firstname,
+ WebKit::WebString::fromUTF8("Johnny"),
+ WebKit::WebString::fromUTF8("Home"),
+ 1,
+ -1);
ProcessPendingMessages();
const IPC::Message* message2 = render_thread_.sink().GetUniqueMessageMatching(
@@ -1115,7 +1117,7 @@
// Verify that "FormsSeen" sends the expected number of fields.
ProcessPendingMessages();
- const IPC::Message* message = render_thread_.sink().GetUniqueMessageMatching(
+ const IPC::Message* message = render_thread_.sink().GetFirstMessageMatching(
ViewHostMsg_FormsSeen::ID);
ASSERT_NE(static_cast<IPC::Message*>(NULL), message);
ViewHostMsg_FormsSeen::Param params;
@@ -1150,11 +1152,12 @@
// Accept a suggestion in a form that has been auto-filled. This triggers
// the direct filling of the firstname element with value parameter.
- view_->didAcceptAutoFillSuggestion(firstname,
- WebKit::WebString::fromUTF8("David"),
- WebKit::WebString(),
- 0,
- 0);
+ autofill_helper_->didAcceptAutoFillSuggestion(
+ firstname,
+ WebKit::WebString::fromUTF8("David"),
+ WebKit::WebString(),
+ 0,
+ 0);
ProcessPendingMessages();
const IPC::Message* message2 = render_thread_.sink().GetUniqueMessageMatching(
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/render_view_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698