summaryrefslogtreecommitdiffstats
path: root/content/test
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 20:22:02 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 20:22:02 +0000
commit233567d7df7457c709fb6ca2c234be1c8647c2a8 (patch)
tree3e0add0148d85700d3967621338cd5d03d69881a /content/test
parent3f93980d6f500aef8e587445db50934e85244774 (diff)
downloadchromium_src-233567d7df7457c709fb6ca2c234be1c8647c2a8.zip
chromium_src-233567d7df7457c709fb6ca2c234be1c8647c2a8.tar.gz
chromium_src-233567d7df7457c709fb6ca2c234be1c8647c2a8.tar.bz2
[content shell] don't require a user action for focus/blur events during layout tests
Many layout tests assume that e.g. window.focus() will change the focus instantly. This is not the case, and those tests will need to be updated. BUG=111316 TEST=layout tests that change the focus and listen to focus events work. R=piman@chromium.org Review URL: https://chromiumcodereview.appspot.com/12317133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
-rw-r--r--content/test/layouttest_support.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 3b57334..28f34a9 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -8,6 +8,7 @@
#include "base/lazy_instance.h"
#include "content/common/gpu/image_transport_surface.h"
#include "content/renderer/devtools/devtools_client.h"
+#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
#include "content/renderer/renderer_webapplicationcachehost_impl.h"
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
@@ -68,4 +69,8 @@ void SetAllowOSMesaImageTransportForTesting() {
#endif
}
+void DoNotRequireUserGestureForFocusChanges() {
+ RenderThreadImpl::current()->set_require_user_gesture_for_focus(false);
+}
+
} // namespace content