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

Side by Side Diff: blimp/net/blimp_message_demultiplexer_unittest.cc

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Fixed misplaced EXPORT directive Created 4 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 unified diff | Download patch
« no previous file with comments | « blimp/net/blimp_message_demultiplexer.cc ('k') | blimp/net/blimp_message_output_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/net/blimp_message_demultiplexer.h" 5 #include "blimp/net/blimp_message_demultiplexer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "blimp/net/test_common.h" 8 #include "blimp/net/test_common.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 TEST_F(BlimpMessageDemultiplexerTest, ProcessMessageFailed) { 52 TEST_F(BlimpMessageDemultiplexerTest, ProcessMessageFailed) {
53 EXPECT_CALL(receiver2_, MockableProcessMessage(Ref(*compositor_msg_), _)) 53 EXPECT_CALL(receiver2_, MockableProcessMessage(Ref(*compositor_msg_), _))
54 .WillOnce(SaveArg<1>(&captured_cb_)); 54 .WillOnce(SaveArg<1>(&captured_cb_));
55 net::TestCompletionCallback cb2; 55 net::TestCompletionCallback cb2;
56 demux_.ProcessMessage(std::move(compositor_msg_), cb2.callback()); 56 demux_.ProcessMessage(std::move(compositor_msg_), cb2.callback());
57 captured_cb_.Run(net::ERR_FAILED); 57 captured_cb_.Run(net::ERR_FAILED);
58 EXPECT_EQ(net::ERR_FAILED, cb2.WaitForResult()); 58 EXPECT_EQ(net::ERR_FAILED, cb2.WaitForResult());
59 } 59 }
60 60
61 TEST_F(BlimpMessageDemultiplexerTest, ProcessMessageNoRegisteredHandler) {
62 net::TestCompletionCallback cb;
63 scoped_ptr<BlimpMessage> unknown_message(new BlimpMessage);
64 unknown_message->set_type(BlimpMessage::UNKNOWN);
65 demux_.ProcessMessage(std::move(unknown_message), cb.callback());
66 EXPECT_EQ(net::ERR_NOT_IMPLEMENTED, cb.WaitForResult());
67 }
61 68
62 } // namespace blimp 69 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/blimp_message_demultiplexer.cc ('k') | blimp/net/blimp_message_output_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698