diff options
Diffstat (limited to 'webkit/tools/test_shell/webwidget_host_win.cc')
-rw-r--r-- | webkit/tools/test_shell/webwidget_host_win.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc index 76a5973..8ea5ca0 100644 --- a/webkit/tools/test_shell/webwidget_host_win.cc +++ b/webkit/tools/test_shell/webwidget_host_win.cc @@ -12,6 +12,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h" #include "webkit/glue/webwidget.h" +#include "webkit/tools/test_shell/test_shell.h" using WebKit::WebInputEvent; using WebKit::WebInputEventFactory; @@ -322,7 +323,10 @@ void WebWidgetHost::CaptureLostEvent() { } void WebWidgetHost::SetFocus(bool enable) { - webwidget_->SetFocus(enable); + // Ignore focus calls in layout test mode so that tests don't mess with each + // other's focus when running in parallel. + if (!TestShell::layout_test_mode()) + webwidget_->SetFocus(enable); } void WebWidgetHost::TrackMouseLeave(bool track) { |