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

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

Issue 11783053: Clean Up: Remove ibus namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/ibus_property.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 43cc3253eccf9e6341f8e0645e661a54b7d6d9b6..a90a207343f0cbcf4a7e6c5c5a3a50c7b79ba322 100644
--- a/chromeos/dbus/ibus/ibus_panel_service_unittest.cc
+++ b/chromeos/dbus/ibus/ibus_panel_service_unittest.cc
@@ -26,8 +26,6 @@ using testing::Return;
using testing::_;
namespace chromeos {
-// TODO(nona): Remove ibus namespace after complete libibus removal.
-namespace ibus {
namespace {
@@ -35,7 +33,7 @@ class MockIBusPanelCandidateWindowHandler
: public IBusPanelCandidateWindowHandlerInterface {
public:
MockIBusPanelCandidateWindowHandler() {}
- MOCK_METHOD2(UpdateLookupTable, void(const ibus::IBusLookupTable& table,
+ MOCK_METHOD2(UpdateLookupTable, void(const IBusLookupTable& table,
bool visible));
MOCK_METHOD0(HideLookupTable, void());
MOCK_METHOD2(UpdateAuxiliaryText, void(const std::string& text,
@@ -56,8 +54,8 @@ class MockIBusPanelPropertyHandler : public IBusPanelPropertyHandlerInterface {
public:
MockIBusPanelPropertyHandler() {}
MOCK_METHOD1(RegisterProperties,
- void(const ibus::IBusPropertyList& properties));
- MOCK_METHOD1(UpdateProperty, void(const ibus::IBusProperty& property));
+ void(const IBusPropertyList& properties));
+ MOCK_METHOD1(UpdateProperty, void(const IBusProperty& property));
private:
DISALLOW_COPY_AND_ASSIGN(MockIBusPanelPropertyHandler);
@@ -147,18 +145,18 @@ class NullArgumentVerifier {
class UpdateLookupTableVerifier {
public:
- UpdateLookupTableVerifier(const ibus::IBusLookupTable& table, bool visible)
+ UpdateLookupTableVerifier(const IBusLookupTable& table, bool visible)
: table_(table),
visible_(visible) {}
- void Verify(const ibus::IBusLookupTable& table, bool visible) {
+ void Verify(const IBusLookupTable& table, bool visible) {
EXPECT_EQ(table_.page_size(), table.page_size());
EXPECT_EQ(table_.cursor_position(), table.cursor_position());
EXPECT_EQ(visible_, visible);
}
private:
- const ibus::IBusLookupTable& table_;
+ const IBusLookupTable& table_;
const bool visible_;
DISALLOW_COPY_AND_ASSIGN(UpdateLookupTableVerifier);
@@ -174,7 +172,7 @@ class PropertyListVerifier {
}
// Verifies the given |resposne| has IBusPropertyList.
- void Verify(const ibus::IBusPropertyList& properties) {
+ void Verify(const IBusPropertyList& properties) {
ASSERT_EQ(expected_keys_.size(), properties.size());
for (size_t i = 0; i < properties.size(); ++i) {
EXPECT_EQ(expected_keys_[i], properties[i]->key());
@@ -192,7 +190,7 @@ class PropertyVerifier {
explicit PropertyVerifier(const std::string& key) : key_(key) {}
// Verifies the given |resposne| has IBusPropertyList.
- void Verify(const ibus::IBusProperty& property) {
+ void Verify(const IBusProperty& property) {
EXPECT_EQ(key_, property.key());
}
@@ -420,7 +418,7 @@ TEST_F(IBusPanelServiceTest, HidePreeditTextTest) {
TEST_F(IBusPanelServiceTest, UpdateLookupTableTest) {
// Set expectations.
const uint32 kSerialNo = 1;
- ibus::IBusLookupTable table;
+ IBusLookupTable table;
table.set_page_size(3);
table.set_cursor_position(4);
const bool kVisible = false;
@@ -471,7 +469,7 @@ TEST_F(IBusPanelServiceTest, UpdateAuxiliaryTextTest) {
ibus::panel::kUpdateAuxiliaryTextMethod);
method_call.SetSerial(kSerialNo);
dbus::MessageWriter writer(&method_call);
- ibus::AppendStringAsIBusText(text, &writer);
+ AppendStringAsIBusText(text, &writer);
writer.AppendBool(kVisible);
// Call exported function.
@@ -503,7 +501,7 @@ TEST_F(IBusPanelServiceTest, UpdatePreeditTextTest) {
ibus::panel::kUpdatePreeditTextMethod);
method_call.SetSerial(kSerialNo);
dbus::MessageWriter writer(&method_call);
- ibus::AppendStringAsIBusText(text, &writer);
+ AppendStringAsIBusText(text, &writer);
writer.AppendUint32(kCursorPos);
writer.AppendBool(kVisible);
@@ -562,9 +560,9 @@ TEST_F(IBusPanelServiceTest, RegisterPropertiesTest) {
keys.push_back("key1");
keys.push_back("key2");
keys.push_back("key3");
- ibus::IBusPropertyList properties;
+ IBusPropertyList properties;
for (size_t i = 0; i < keys.size(); ++i) {
- ibus::IBusProperty* property = new ibus::IBusProperty;
+ IBusProperty* property = new IBusProperty;
property->set_key(keys[i]);
properties.push_back(property);
}
@@ -582,7 +580,7 @@ TEST_F(IBusPanelServiceTest, RegisterPropertiesTest) {
ibus::panel::kRegisterPropertiesMethod);
method_call.SetSerial(1UL);
dbus::MessageWriter writer(&method_call);
- ibus::AppendIBusPropertyList(properties, &writer);
+ AppendIBusPropertyList(properties, &writer);
// Call exported function.
EXPECT_NE(method_callback_map_.find(ibus::panel::kRegisterPropertiesMethod),
@@ -595,7 +593,7 @@ TEST_F(IBusPanelServiceTest, RegisterPropertiesTest) {
TEST_F(IBusPanelServiceTest, UpdatePropertyTest) {
// Set expectations.
const char kKey[] = "key";
- ibus::IBusProperty property;
+ IBusProperty property;
property.set_key(kKey);
PropertyVerifier response_expectation(kKey);
@@ -610,7 +608,7 @@ TEST_F(IBusPanelServiceTest, UpdatePropertyTest) {
ibus::panel::kUpdatePropertyMethod);
method_call.SetSerial(1UL);
dbus::MessageWriter writer(&method_call);
- ibus::AppendIBusProperty(property, &writer);
+ AppendIBusProperty(property, &writer);
// Call exported function.
EXPECT_NE(method_callback_map_.find(ibus::panel::kUpdatePropertyMethod),
@@ -621,5 +619,4 @@ TEST_F(IBusPanelServiceTest, UpdatePropertyTest) {
base::Unretained(&response_sender)));
}
-} // namespace ibus
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/ibus/ibus_panel_service.cc ('k') | chromeos/dbus/ibus/ibus_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698