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

Unified Diff: mojo/system/dispatcher_unittest.cc

Issue 136343004: Mojo: Add a "GetType()" to Dispatchers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « mojo/system/dispatcher.h ('k') | mojo/system/message_pipe_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/dispatcher_unittest.cc
diff --git a/mojo/system/dispatcher_unittest.cc b/mojo/system/dispatcher_unittest.cc
index 18ca4adfb2a56c510943ba89d8dc8dc94b3eef06..a54a902432dbbcd5e643dcc4b8351c737931b26a 100644
--- a/mojo/system/dispatcher_unittest.cc
+++ b/mojo/system/dispatcher_unittest.cc
@@ -21,6 +21,10 @@ class TrivialDispatcher : public Dispatcher {
public:
TrivialDispatcher() {}
+ virtual Type GetType() OVERRIDE {
+ return kTypeUnknown;
+ }
+
private:
friend class base::RefCountedThreadSafe<TrivialDispatcher>;
virtual ~TrivialDispatcher() {}
@@ -36,6 +40,8 @@ class TrivialDispatcher : public Dispatcher {
TEST(DispatcherTest, Basic) {
scoped_refptr<Dispatcher> d(new TrivialDispatcher());
+ EXPECT_EQ(Dispatcher::kTypeUnknown, d->GetType());
+
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
d->WriteMessage(NULL, 0, NULL, MOJO_WRITE_MESSAGE_FLAG_NONE));
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
« no previous file with comments | « mojo/system/dispatcher.h ('k') | mojo/system/message_pipe_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698