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_gtk.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_gtk.cc')
-rw-r--r-- | webkit/tools/test_shell/webwidget_host_gtk.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc index 90194c5..599d580 100644 --- a/webkit/tools/test_shell/webwidget_host_gtk.cc +++ b/webkit/tools/test_shell/webwidget_host_gtk.cc @@ -15,6 +15,7 @@ #include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" #include "webkit/glue/webwidget.h" +#include "webkit/tools/test_shell/test_shell.h" using WebKit::WebInputEventFactory; using WebKit::WebKeyboardEvent; @@ -178,7 +179,10 @@ class WebWidgetHostGtkWidget { static gboolean HandleFocusIn(GtkWidget* widget, GdkEventFocus* focus, WebWidgetHost* host) { - host->webwidget()->SetFocus(true); + // 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()) + host->webwidget()->SetFocus(true); return FALSE; } @@ -186,7 +190,10 @@ class WebWidgetHostGtkWidget { static gboolean HandleFocusOut(GtkWidget* widget, GdkEventFocus* focus, WebWidgetHost* host) { - host->webwidget()->SetFocus(false); + // 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()) + host->webwidget()->SetFocus(false); return FALSE; } |