summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:54:35 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:54:35 +0000
commit130efb094a3c96bda00da28615b5c1e0481b7218 (patch)
treef8bb5604c20d811f4073a85ab4385eaced96918b /chrome/renderer
parent997e22224e1062a4cd39373057a68879a1d7a3ac (diff)
downloadchromium_src-130efb094a3c96bda00da28615b5c1e0481b7218.zip
chromium_src-130efb094a3c96bda00da28615b5c1e0481b7218.tar.gz
chromium_src-130efb094a3c96bda00da28615b5c1e0481b7218.tar.bz2
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
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_widget.cc6
1 files changed, 6 insertions, 0 deletions
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.