From 130efb094a3c96bda00da28615b5c1e0481b7218 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Fri, 18 Sep 2009 18:54:35 +0000 Subject: This CL makes the browser focus tests faster by replacing some time-outs with notifications. BUG=22065 TEST=Run the interactive tests, especially BrowserFocusTest*FocusTraversal* These tests should run in few seconds. Review URL: http://codereview.chromium.org/210013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26597 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_widget.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/renderer') diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 3aa58e3..0d7fadf 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -650,6 +650,12 @@ void RenderWidget::show(WebNavigationPolicy) { } void RenderWidget::didFocus() { + // Note that didFocus() is invoked everytime a new node is focused in the + // page. It could be expected that it would be called only when the widget + // gets the focus. If the current behavior was to change in WebKit for the + // expected one, the following notification would not work anymore. + Send(new ViewHostMsg_FocusedNodeChanged(routing_id_)); + // Prevent the widget from stealing the focus if it does not have focus // already. We do this by explicitely setting the focus to false again. // We only let the browser focus the renderer. -- cgit v1.1