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

Unified Diff: chromeos/ime/mock_ime_candidate_window_handler.cc

Issue 23822002: Adding new mock classes for input method handlers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/ime/mock_ime_candidate_window_handler.h ('k') | chromeos/ime/mock_ime_engine_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/ime/mock_ime_candidate_window_handler.cc
diff --git a/chromeos/ime/mock_ime_candidate_window_handler.cc b/chromeos/ime/mock_ime_candidate_window_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d67c9420bf6e808e28290b0392f25122ea2edae8
--- /dev/null
+++ b/chromeos/ime/mock_ime_candidate_window_handler.cc
@@ -0,0 +1,60 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/ime/mock_ime_candidate_window_handler.h"
+
+namespace chromeos {
+
+MockIMECandidateWindowHandler::MockIMECandidateWindowHandler()
+ : set_cursor_location_call_count_(0),
+ update_lookup_table_call_count_(0),
+ update_auxiliary_text_call_count_(0) {
+}
+
+MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() {
+
+}
+
+void MockIMECandidateWindowHandler::UpdateLookupTable(
+ const IBusLookupTable& table,
+ bool visible) {
+ ++update_lookup_table_call_count_;
+ last_update_lookup_table_arg_.lookup_table.CopyFrom(table);
+ last_update_lookup_table_arg_.is_visible = visible;
+}
+
+void MockIMECandidateWindowHandler::HideLookupTable() {
+}
+
+void MockIMECandidateWindowHandler::UpdateAuxiliaryText(const std::string& text,
+ bool visible) {
+ ++update_auxiliary_text_call_count_;
+ last_update_auxiliary_text_arg_.text = text;
+ last_update_auxiliary_text_arg_.is_visible = visible;
+}
+
+void MockIMECandidateWindowHandler::HideAuxiliaryText() {
+}
+
+void MockIMECandidateWindowHandler::UpdatePreeditText(const std::string& text,
+ uint32 cursor_pos,
+ bool visible) {
+}
+
+void MockIMECandidateWindowHandler::HidePreeditText() {
+}
+
+void MockIMECandidateWindowHandler::SetCursorLocation(
+ const ibus::Rect& cursor_location,
+ const ibus::Rect& composition_head) {
+ ++set_cursor_location_call_count_;
+}
+
+void MockIMECandidateWindowHandler::Reset() {
+ set_cursor_location_call_count_ = 0;
+ update_lookup_table_call_count_ = 0;
+ update_auxiliary_text_call_count_ = 0;
+}
+
+} // namespace chromeos
« no previous file with comments | « chromeos/ime/mock_ime_candidate_window_handler.h ('k') | chromeos/ime/mock_ime_engine_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698