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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc

Issue 67313006: Delete IBusClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete test. Created 7 years, 1 month 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 | « chrome/browser/chromeos/input_method/input_method_manager_impl.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
index c5b5e8d095f5b8303df8b21712800c14d5af89b2..aa38eea0f0875d997aecb91217dfd2749de341b6 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/chromeos/input_method/mock_candidate_window_controller.h"
#include "chrome/browser/chromeos/input_method/mock_ibus_controller.h"
#include "chromeos/dbus/fake_dbus_thread_manager.h"
-#include "chromeos/dbus/ibus/mock_ibus_client.h"
#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/fake_input_method_delegate.h"
#include "chromeos/ime/mock_component_extension_ime_manager_delegate.h"
@@ -151,9 +150,6 @@ class InputMethodManagerImplTest : public testing::Test {
// Helper function to initialize IBus bus connection for testing. Do not use
// ibus related mocks before calling this function.
void InitIBusBus() {
- mock_ibus_client_ = new MockIBusClient;
- fake_dbus_thread_manager_->SetIBusClient(
- scoped_ptr<IBusClient>(mock_ibus_client_));
mock_ibus_daemon_controller_->EmulateConnect();
}
@@ -163,7 +159,6 @@ class InputMethodManagerImplTest : public testing::Test {
MockCandidateWindowController* candidate_window_controller_;
MockIBusDaemonController* mock_ibus_daemon_controller_;
scoped_ptr<MockIMEEngineHandler> mock_engine_handler_;
- MockIBusClient* mock_ibus_client_;
FakeDBusThreadManager* fake_dbus_thread_manager_;
MockXKeyboard* xkeyboard_;
base::MessageLoop message_loop_;
@@ -1105,26 +1100,6 @@ TEST_F(InputMethodManagerImplTest, TestAddExtensionInputThenLockScreen) {
manager_->RemoveObserver(&observer);
}
-TEST_F(InputMethodManagerImplTest, TestReset) {
- InitComponentExtension();
- InitIBusBus();
- manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN);
- std::vector<std::string> ids;
- ids.push_back("xkb:us::eng");
- ids.push_back(nacl_mozc_us_id);
- EXPECT_TRUE(manager_->EnableInputMethods(ids));
- EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
- EXPECT_EQ(0, mock_engine_handler_->reset_call_count());
- manager_->ChangeInputMethod(nacl_mozc_us_id);
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(nacl_mozc_us_id, mock_ibus_client_->latest_global_engine_name());
- EXPECT_EQ(0, mock_engine_handler_->reset_call_count());
- manager_->ChangeInputMethod("xkb:us::eng");
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(nacl_mozc_us_id, mock_ibus_client_->latest_global_engine_name());
- EXPECT_EQ(0, mock_engine_handler_->reset_call_count());
-}
-
TEST_F(InputMethodManagerImplTest,
ChangeInputMethodBeforeComponentExtensionInitialization_OneIME) {
manager_->SetState(InputMethodManager::STATE_BROWSER_SCREEN);
@@ -1136,8 +1111,7 @@ TEST_F(InputMethodManagerImplTest,
InitIBusBus();
InitComponentExtension();
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(nacl_mozc_us_id, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(nacl_mozc_us_id, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
@@ -1153,8 +1127,7 @@ TEST_F(InputMethodManagerImplTest,
InitComponentExtension();
InitIBusBus();
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(nacl_mozc_jp_id, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(nacl_mozc_jp_id, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
@@ -1172,8 +1145,7 @@ TEST_F(InputMethodManagerImplTest,
InitComponentExtension();
InitIBusBus();
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(ext_id, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(ext_id, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
@@ -1197,8 +1169,7 @@ TEST_F(InputMethodManagerImplTest,
InitComponentExtension();
InitIBusBus();
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(ext_id2, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(ext_id2, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
@@ -1214,8 +1185,7 @@ TEST_F(InputMethodManagerImplTest,
ids.push_back(ext_id);
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ(1U, manager_->GetNumActiveInputMethods());
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(ext_id, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(ext_id, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
@@ -1236,11 +1206,9 @@ TEST_F(InputMethodManagerImplTest,
ids.push_back(ext_id2);
EXPECT_TRUE(manager_->EnableInputMethods(ids));
EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
- EXPECT_EQ(1, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(ext_id1, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(ext_id1, manager_->GetCurrentInputMethod().id());
manager_->ChangeInputMethod(ext_id2);
- EXPECT_EQ(2, mock_ibus_client_->set_global_engine_call_count());
- EXPECT_EQ(ext_id2, mock_ibus_client_->latest_global_engine_name());
+ EXPECT_EQ(ext_id2, manager_->GetCurrentInputMethod().id());
}
TEST_F(InputMethodManagerImplTest,
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager_impl.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698