OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/dbus/ibus/ibus_input_context_client.h" | 5 #include "chromeos/dbus/ibus/ibus_input_context_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chromeos/dbus/ibus/ibus_constants.h" | 10 #include "chromeos/dbus/ibus/ibus_constants.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 EXPECT_CALL(*mock_proxy_, ConnectToSignal( | 126 EXPECT_CALL(*mock_proxy_, ConnectToSignal( |
127 ibus::input_context::kServiceInterface, | 127 ibus::input_context::kServiceInterface, |
128 ibus::input_context::kShowPreeditTextSignal, _, _)) | 128 ibus::input_context::kShowPreeditTextSignal, _, _)) |
129 .WillRepeatedly( | 129 .WillRepeatedly( |
130 Invoke(this, &IBusInputContextClientTest::OnConnectToSignal)); | 130 Invoke(this, &IBusInputContextClientTest::OnConnectToSignal)); |
131 EXPECT_CALL(*mock_proxy_, ConnectToSignal( | 131 EXPECT_CALL(*mock_proxy_, ConnectToSignal( |
132 ibus::input_context::kServiceInterface, | 132 ibus::input_context::kServiceInterface, |
133 ibus::input_context::kUpdatePreeditTextSignal, _, _)) | 133 ibus::input_context::kUpdatePreeditTextSignal, _, _)) |
134 .WillRepeatedly( | 134 .WillRepeatedly( |
135 Invoke(this, &IBusInputContextClientTest::OnConnectToSignal)); | 135 Invoke(this, &IBusInputContextClientTest::OnConnectToSignal)); |
| 136 EXPECT_CALL(*mock_proxy_, ConnectToSignal( |
| 137 ibus::input_context::kServiceInterface, |
| 138 ibus::input_context::kDeleteSurroundingTextSignal, _, _)) |
| 139 .WillRepeatedly( |
| 140 Invoke(this, &IBusInputContextClientTest::OnConnectToSignal)); |
136 | 141 |
137 // Call Initialize to create object proxy and connect signals. | 142 // Call Initialize to create object proxy and connect signals. |
138 client_->Initialize(mock_bus_.get(), dbus::ObjectPath(kObjectPath)); | 143 client_->Initialize(mock_bus_.get(), dbus::ObjectPath(kObjectPath)); |
139 } | 144 } |
140 | 145 |
141 virtual void TearDown() OVERRIDE { | 146 virtual void TearDown() OVERRIDE { |
142 EXPECT_TRUE(client_->IsObjectProxyReady()); | 147 EXPECT_TRUE(client_->IsObjectProxyReady()); |
143 client_->ResetObjectProxy(); | 148 client_->ResetObjectProxy(); |
144 EXPECT_FALSE(client_->IsObjectProxyReady()); | 149 EXPECT_FALSE(client_->IsObjectProxyReady()); |
145 } | 150 } |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 // Create response. | 622 // Create response. |
618 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); | 623 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); |
619 response_ = response.get(); | 624 response_ = response.get(); |
620 | 625 |
621 // Call SetCursorLocation. | 626 // Call SetCursorLocation. |
622 client_->PropertyActivate(kPropertyKey, kPropertyState); | 627 client_->PropertyActivate(kPropertyKey, kPropertyState); |
623 // Run the message loop. | 628 // Run the message loop. |
624 message_loop_.RunUntilIdle(); | 629 message_loop_.RunUntilIdle(); |
625 } | 630 } |
626 } // namespace chromeos | 631 } // namespace chromeos |
OLD | NEW |