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

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

Issue 1538253002: Switch to standard integer types in blimp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_output_buffer.cc ('k') | blimp/net/common.h » ('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_output_buffer.h" 5 #include "blimp/net/blimp_message_output_buffer.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "blimp/common/proto/blimp_message.pb.h" 10 #include "blimp/common/proto/blimp_message.pb.h"
(...skipping 28 matching lines...) Expand all
39 buffer_.reset(new BlimpMessageOutputBuffer(2 * input_msg_.GetCachedSize())); 39 buffer_.reset(new BlimpMessageOutputBuffer(2 * input_msg_.GetCachedSize()));
40 } 40 }
41 41
42 protected: 42 protected:
43 void AddOutputExpectation(const BlimpMessage& msg) { 43 void AddOutputExpectation(const BlimpMessage& msg) {
44 EXPECT_CALL(output_processor_, MockableProcessMessage(EqualsProto(msg), _)) 44 EXPECT_CALL(output_processor_, MockableProcessMessage(EqualsProto(msg), _))
45 .WillOnce(SaveArg<1>(&captured_cb_)) 45 .WillOnce(SaveArg<1>(&captured_cb_))
46 .RetiresOnSaturation(); 46 .RetiresOnSaturation();
47 } 47 }
48 48
49 BlimpMessage WithMessageId(const BlimpMessage& message, int64 message_id) { 49 BlimpMessage WithMessageId(const BlimpMessage& message, int64_t message_id) {
50 BlimpMessage output = message; 50 BlimpMessage output = message;
51 output.set_message_id(message_id); 51 output.set_message_id(message_id);
52 return output; 52 return output;
53 } 53 }
54 54
55 BlimpMessage input_msg_; 55 BlimpMessage input_msg_;
56 BlimpMessage compositor_msg_; 56 BlimpMessage compositor_msg_;
57 57
58 base::MessageLoop message_loop_; 58 base::MessageLoop message_loop_;
59 net::CompletionCallback captured_cb_; 59 net::CompletionCallback captured_cb_;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // Remote end acknowledges #1, buffer should be empty. 254 // Remote end acknowledges #1, buffer should be empty.
255 buffer_->OnMessageCheckpoint(2); 255 buffer_->OnMessageCheckpoint(2);
256 ASSERT_EQ(0, buffer_->GetBufferByteSizeForTest()); 256 ASSERT_EQ(0, buffer_->GetBufferByteSizeForTest());
257 ASSERT_EQ(0, buffer_->GetUnacknowledgedMessageCountForTest()); 257 ASSERT_EQ(0, buffer_->GetUnacknowledgedMessageCountForTest());
258 EXPECT_EQ(net::OK, complete_cb_2.WaitForResult()); 258 EXPECT_EQ(net::OK, complete_cb_2.WaitForResult());
259 } 259 }
260 260
261 } // namespace 261 } // namespace
262 } // namespace blimp 262 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/blimp_message_output_buffer.cc ('k') | blimp/net/common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698