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

Unified Diff: net/websockets/websocket_frame_parser_test.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 | « net/websockets/websocket_basic_stream_test.cc ('k') | net/websockets/websocket_frame_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame_parser_test.cc
diff --git a/net/websockets/websocket_frame_parser_test.cc b/net/websockets/websocket_frame_parser_test.cc
index 14f7113fd272bd8d54255f4b57505bbca231104a..c72e9e137bca20bd81ff06b9fec0377d0810365a 100644
--- a/net/websockets/websocket_frame_parser_test.cc
+++ b/net/websockets/websocket_frame_parser_test.cc
@@ -4,12 +4,13 @@
#include "net/websockets/websocket_frame_parser.h"
+#include <stdint.h>
+
#include <algorithm>
#include <vector>
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
-#include "base/port.h"
#include "net/base/io_buffer.h"
#include "net/websockets/websocket_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -35,19 +36,18 @@ struct FrameHeaderTestCase {
};
const FrameHeaderTestCase kFrameHeaderTests[] = {
- { "\x81\x00", 2, GG_UINT64_C(0), kWebSocketNormalClosure },
- { "\x81\x7D", 2, GG_UINT64_C(125), kWebSocketNormalClosure },
- { "\x81\x7E\x00\x7E", 4, GG_UINT64_C(126), kWebSocketNormalClosure },
- { "\x81\x7E\xFF\xFF", 4, GG_UINT64_C(0xFFFF), kWebSocketNormalClosure },
- { "\x81\x7F\x00\x00\x00\x00\x00\x01\x00\x00", 10, GG_UINT64_C(0x10000),
- kWebSocketNormalClosure },
- { "\x81\x7F\x00\x00\x00\x00\x7F\xFF\xFF\xFF", 10, GG_UINT64_C(0x7FFFFFFF),
- kWebSocketNormalClosure },
- { "\x81\x7F\x00\x00\x00\x00\x80\x00\x00\x00", 10, GG_UINT64_C(0x80000000),
- kWebSocketErrorMessageTooBig },
- { "\x81\x7F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 10,
- GG_UINT64_C(0x7FFFFFFFFFFFFFFF), kWebSocketErrorMessageTooBig }
-};
+ {"\x81\x00", 2, UINT64_C(0), kWebSocketNormalClosure},
+ {"\x81\x7D", 2, UINT64_C(125), kWebSocketNormalClosure},
+ {"\x81\x7E\x00\x7E", 4, UINT64_C(126), kWebSocketNormalClosure},
+ {"\x81\x7E\xFF\xFF", 4, UINT64_C(0xFFFF), kWebSocketNormalClosure},
+ {"\x81\x7F\x00\x00\x00\x00\x00\x01\x00\x00", 10, UINT64_C(0x10000),
+ kWebSocketNormalClosure},
+ {"\x81\x7F\x00\x00\x00\x00\x7F\xFF\xFF\xFF", 10, UINT64_C(0x7FFFFFFF),
+ kWebSocketNormalClosure},
+ {"\x81\x7F\x00\x00\x00\x00\x80\x00\x00\x00", 10, UINT64_C(0x80000000),
+ kWebSocketErrorMessageTooBig},
+ {"\x81\x7F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 10,
+ UINT64_C(0x7FFFFFFFFFFFFFFF), kWebSocketErrorMessageTooBig}};
const int kNumFrameHeaderTests = arraysize(kFrameHeaderTests);
TEST(WebSocketFrameParserTest, DecodeNormalFrame) {
« no previous file with comments | « net/websockets/websocket_basic_stream_test.cc ('k') | net/websockets/websocket_frame_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698