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

Side by Side Diff: chromeos/dbus/ibus/ibus_panel_service_unittest.cc

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_panel_service.h" 5 #include "chromeos/dbus/ibus/ibus_panel_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 scoped_ptr<MockIBusPanelCandidateWindowHandler> candidate_window_handler_; 318 scoped_ptr<MockIBusPanelCandidateWindowHandler> candidate_window_handler_;
319 // The mock property handler. Do not free, this is owned by IBusPanelService. 319 // The mock property handler. Do not free, this is owned by IBusPanelService.
320 scoped_ptr<MockIBusPanelPropertyHandler> property_handler_; 320 scoped_ptr<MockIBusPanelPropertyHandler> property_handler_;
321 // The stub input context client. 321 // The stub input context client.
322 scoped_ptr<IBusInputContextClient> stub_input_context_client_; 322 scoped_ptr<IBusInputContextClient> stub_input_context_client_;
323 // The mock bus. 323 // The mock bus.
324 scoped_refptr<dbus::MockBus> mock_bus_; 324 scoped_refptr<dbus::MockBus> mock_bus_;
325 // The mock exported object. 325 // The mock exported object.
326 scoped_refptr<dbus::MockExportedObject> mock_exported_object_; 326 scoped_refptr<dbus::MockExportedObject> mock_exported_object_;
327 // A message loop to emulate asynchronous behavior. 327 // A message loop to emulate asynchronous behavior.
328 MessageLoop message_loop_; 328 base::MessageLoop message_loop_;
329 // The map from method call to method call handler. 329 // The map from method call to method call handler.
330 std::map<std::string, dbus::ExportedObject::MethodCallCallback> 330 std::map<std::string, dbus::ExportedObject::MethodCallCallback>
331 method_callback_map_; 331 method_callback_map_;
332 332
333 private: 333 private:
334 // Used to implement the mock method call. 334 // Used to implement the mock method call.
335 void OnMethodExported( 335 void OnMethodExported(
336 const std::string& interface_name, 336 const std::string& interface_name,
337 const std::string& method_name, 337 const std::string& method_name,
338 const dbus::ExportedObject::MethodCallCallback& method_callback, 338 const dbus::ExportedObject::MethodCallCallback& method_callback,
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // Call exported function. 616 // Call exported function.
617 EXPECT_NE(method_callback_map_.find(ibus::panel::kUpdatePropertyMethod), 617 EXPECT_NE(method_callback_map_.find(ibus::panel::kUpdatePropertyMethod),
618 method_callback_map_.end()); 618 method_callback_map_.end());
619 method_callback_map_[ibus::panel::kUpdatePropertyMethod].Run( 619 method_callback_map_[ibus::panel::kUpdatePropertyMethod].Run(
620 &method_call, 620 &method_call,
621 base::Bind(&MockResponseSender::Run, 621 base::Bind(&MockResponseSender::Run,
622 base::Unretained(&response_sender))); 622 base::Unretained(&response_sender)));
623 } 623 }
624 624
625 } // namespace chromeos 625 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/ibus/ibus_input_context_client_unittest.cc ('k') | chromeos/dbus/mock_cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698