diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 23:09:37 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 23:09:37 +0000 |
commit | b9a0b1b39c5bcf551178cab7a2aa5f24d5afc929 (patch) | |
tree | d59dbb65ae4d905230a9c3a112f7302fb531096e /webkit/tools/test_shell/webwidget_host_win.cc | |
parent | 3c85b8003597b96007ed2e6a98007bb6f3c0ddb2 (diff) | |
download | chromium_src-b9a0b1b39c5bcf551178cab7a2aa5f24d5afc929.zip chromium_src-b9a0b1b39c5bcf551178cab7a2aa5f24d5afc929.tar.gz chromium_src-b9a0b1b39c5bcf551178cab7a2aa5f24d5afc929.tar.bz2 |
Enable running webkit tests in parallel and make it use
the number of cpus as the default number of test_shells
to spawn.
This involved ignoring focus/blur messages
and mocking out the clipboard.
The test_shell window still sometimes seems to get focus,
so there's still a bit more work to do, but the tests
seem to all pass.
We still default to 1 test_shell at a time. Once I get this
committed, I'll try multiple. I just don't want to have
to rollback this whole thing.
Review URL: http://codereview.chromium.org/56040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12821 0039d316-1c4b-4281-b951-d872f2087c98
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) { |