Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: chromeos/dbus/ibus/ibus_panel_service_unittest.cc

Issue 12017010: Introduce bypass logic for SetCursorLocation message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/ibus/ibus_panel_service.cc ('k') | chromeos/dbus/ibus/mock_ibus_input_context_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/ibus/ibus_panel_service_unittest.cc
diff --git a/chromeos/dbus/ibus/ibus_panel_service_unittest.cc b/chromeos/dbus/ibus/ibus_panel_service_unittest.cc
index 85a59e9c2e4a0278796dec631b00cb44d1cc65af..43cc3253eccf9e6341f8e0645e661a54b7d6d9b6 100644
--- a/chromeos/dbus/ibus/ibus_panel_service_unittest.cc
+++ b/chromeos/dbus/ibus/ibus_panel_service_unittest.cc
@@ -9,6 +9,7 @@
#include "base/message_loop.h"
#include "base/values.h"
#include "chromeos/dbus/ibus/ibus_constants.h"
+#include "chromeos/dbus/ibus/ibus_input_context_client.h"
#include "chromeos/dbus/ibus/ibus_lookup_table.h"
#include "chromeos/dbus/ibus/ibus_property.h"
#include "chromeos/dbus/ibus/ibus_text.h"
@@ -44,6 +45,8 @@ class MockIBusPanelCandidateWindowHandler
uint32 cursor_pos,
bool visible) );
MOCK_METHOD0(HidePreeditText, void());
+ MOCK_METHOD2(SetCursorLocation, void(const ibus::Rect& cursor_location,
+ const ibus::Rect& composition_head));
private:
DISALLOW_COPY_AND_ASSIGN(MockIBusPanelCandidateWindowHandler);
@@ -290,10 +293,14 @@ class IBusPanelServiceTest : public testing::Test {
AssertOnOriginThread())
.WillRepeatedly(Return());
+ stub_input_context_client_.reset(IBusInputContextClient::Create(
+ STUB_DBUS_CLIENT_IMPLEMENTATION));
+
// Create a service
service_.reset(IBusPanelService::Create(
REAL_DBUS_CLIENT_IMPLEMENTATION,
- mock_bus_.get()));
+ mock_bus_.get(),
+ stub_input_context_client_.get()));
// Set panel handler.
candidate_window_handler_.reset(new MockIBusPanelCandidateWindowHandler());
@@ -310,6 +317,8 @@ class IBusPanelServiceTest : public testing::Test {
scoped_ptr<MockIBusPanelCandidateWindowHandler> candidate_window_handler_;
// The mock property handler. Do not free, this is owned by IBusPanelService.
scoped_ptr<MockIBusPanelPropertyHandler> property_handler_;
+ // The stub input context client.
+ scoped_ptr<IBusInputContextClient> stub_input_context_client_;
// The mock bus.
scoped_refptr<dbus::MockBus> mock_bus_;
// The mock exported object.
« no previous file with comments | « chromeos/dbus/ibus/ibus_panel_service.cc ('k') | chromeos/dbus/ibus/mock_ibus_input_context_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698