diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 07:41:32 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 07:41:32 +0000 |
commit | 1730b4c3681cf23db126f4b7f7a877f922eee1ac (patch) | |
tree | 96d52839cf9f045b8bf963bbac22c21d7e326cf2 | |
parent | 1744c424d7ae86f7dbd5228d124c928a3d260b3e (diff) | |
download | chromium_src-1730b4c3681cf23db126f4b7f7a877f922eee1ac.zip chromium_src-1730b4c3681cf23db126f4b7f7a877f922eee1ac.tar.gz chromium_src-1730b4c3681cf23db126f4b7f7a877f922eee1ac.tar.bz2 |
Fix issue 27927: linux hang in RenderViewTest.ImeComposition.
BUG=27927
TEST=none
Review URL: http://codereview.chromium.org/668219
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40885 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/render_view_unittest.cc | 9 | ||||
-rw-r--r-- | chrome/test/render_view_test.h | 11 |
2 files changed, 14 insertions, 6 deletions
diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc index 2dc02bf..db4eacf 100644 --- a/chrome/renderer/render_view_unittest.cc +++ b/chrome/renderer/render_view_unittest.cc @@ -23,7 +23,8 @@ using WebKit::WebString; using WebKit::WebTextDirection; using WebKit::WebURLError; -#if 0 // !defined(OS_LINUX) +namespace { + static WebCompositionCommand ToCompositionCommand(int string_type) { switch (string_type) { default: @@ -36,7 +37,8 @@ static WebCompositionCommand ToCompositionCommand(int string_type) { return WebKit::WebCompositionCommandConfirm; } } -#endif + +} // namespace TEST_F(RenderViewTest, OnLoadAlternateHTMLText) { // Test a new navigation. @@ -144,8 +146,6 @@ TEST_F(RenderViewTest, OnImeStateChanged) { // cases, this test should not only call IME-related functions in the // RenderWidget class, but also call some RenderWidget members, e.g. // ExecuteJavaScript(), RenderWidget::OnSetFocus(), etc. -// Disabled on Linux: http://crbug.com/27927 -#if 0 // !defined(OS_LINUX) TEST_F(RenderViewTest, ImeComposition) { enum ImeCommand { IME_INITIALIZE, @@ -263,7 +263,6 @@ TEST_F(RenderViewTest, ImeComposition) { } } } -#endif // Test that the RenderView::OnSetTextDirection() function can change the text // direction of the selected input element. diff --git a/chrome/test/render_view_test.h b/chrome/test/render_view_test.h index 6a36097..4834d9a 100644 --- a/chrome/test/render_view_test.h +++ b/chrome/test/render_view_test.h @@ -55,11 +55,20 @@ class RenderViewTest : public testing::Test { virtual void TearDown(); + // A special WebKitClientImpl class for getting rid off the dependency to the + // sandbox, which is not available in RenderViewTest. + class RendererWebKitClientImplNoSandbox : public RendererWebKitClientImpl { + public: + virtual WebKit::WebSandboxSupport* sandboxSupport() { + return NULL; + } + }; + MessageLoop msg_loop_; MockRenderThread render_thread_; scoped_ptr<MockRenderProcess> mock_process_; scoped_refptr<RenderView> view_; - RendererWebKitClientImpl webkitclient_; + RendererWebKitClientImplNoSandbox webkitclient_; scoped_ptr<MockKeyboard> mock_keyboard_; // Used to setup the process so renderers can run. |