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

Unified Diff: build_tools/debug_server/debug_server/unit_tests/rsp_packetizer_test.h

Issue 6312039: RSP proxy that can record session (for playback testing).... (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src/
Patch Set: Created 9 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
Index: build_tools/debug_server/debug_server/unit_tests/rsp_packetizer_test.h
===================================================================
--- build_tools/debug_server/debug_server/unit_tests/rsp_packetizer_test.h (revision 0)
+++ build_tools/debug_server/debug_server/unit_tests/rsp_packetizer_test.h (revision 0)
@@ -0,0 +1,31 @@
+#ifndef NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_UNIT_TESTS_RSP_TOKENIZER_TEST_H_
+#define NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_UNIT_TESTS_RSP_TOKENIZER_TEST_H_
+
+#pragma once
+#include <string>
+#include "..\common\rsp_packetizer.h"
+
+namespace rsp {
+class Packetizer_test : public PacketConsumer {
+public:
+ Packetizer_test();
+ ~Packetizer_test();
+
+ bool Run(std::string* error);
+
+protected:
+ void Clean();
+ bool CompareTokenBody(const char* text);
+ virtual void OnPacket(debug::Blob& body, bool valid_checksum);
+ virtual void OnUnexpectedChar(char unexpected_char);
+ virtual void OnBreak();
+
+ enum ResponseType {NONE, PACKET, INVALID_CHAR, BREAK};
+ ResponseType response_type_;
+ int response_num_; // should be 1 for passed tests.
+ debug::Blob packet_body_;
+ bool token_is_checksum_valid_;
+};
+} //namespace rsp
+
+#endif // NACL_SDK_BUILD_TOOLS_DEBUG_SERVER_UNIT_TESTS_RSP_TOKENIZER_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698