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

Unified Diff: remoting/host/native_messaging/native_messaging_reader_unittest.cc

Issue 1547473005: Switch to standard integer types in remoting/host/. (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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/native_messaging/native_messaging_reader_unittest.cc
diff --git a/remoting/host/native_messaging/native_messaging_reader_unittest.cc b/remoting/host/native_messaging/native_messaging_reader_unittest.cc
index 4a22ec827cd5b1ff56adf7997d3d375a7f3d0476..8c076b4919041a7ca52178dd2c1f6432486aa1b6 100644
--- a/remoting/host/native_messaging/native_messaging_reader_unittest.cc
+++ b/remoting/host/native_messaging/native_messaging_reader_unittest.cc
@@ -4,7 +4,8 @@
#include "remoting/host/native_messaging/native_messaging_reader.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -75,7 +76,7 @@ void NativeMessagingReaderTest::OnMessage(scoped_ptr<base::Value> message) {
}
void NativeMessagingReaderTest::WriteMessage(const std::string& message) {
- uint32 length = message.length();
+ uint32_t length = message.length();
WriteData(reinterpret_cast<char*>(&length), 4);
WriteData(message.data(), length);
}
@@ -97,7 +98,7 @@ TEST_F(NativeMessagingReaderTest, GoodMessage) {
}
TEST_F(NativeMessagingReaderTest, InvalidLength) {
- uint32 length = 0xffffffff;
+ uint32_t length = 0xffffffff;
WriteData(reinterpret_cast<char*>(&length), 4);
Run();
EXPECT_FALSE(message_);
@@ -116,14 +117,14 @@ TEST_F(NativeMessagingReaderTest, ShortHeader) {
}
TEST_F(NativeMessagingReaderTest, EmptyBody) {
- uint32 length = 1;
+ uint32_t length = 1;
WriteData(reinterpret_cast<char*>(&length), 4);
Run();
EXPECT_FALSE(message_);
}
TEST_F(NativeMessagingReaderTest, ShortBody) {
- uint32 length = 2;
+ uint32_t length = 2;
WriteData(reinterpret_cast<char*>(&length), 4);
// Only write 1 byte, where the header indicates there should be 2 bytes.
« no previous file with comments | « remoting/host/native_messaging/native_messaging_reader.cc ('k') | remoting/host/native_messaging/native_messaging_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698