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

Unified Diff: ppapi/native_client/tests/ppapi_simple_tests/event.stdin

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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: ppapi/native_client/tests/ppapi_simple_tests/event.stdin
===================================================================
--- ppapi/native_client/tests/ppapi_simple_tests/event.stdin (revision 0)
+++ ppapi/native_client/tests/ppapi_simple_tests/event.stdin (revision 0)
@@ -0,0 +1,133 @@
+# define a bunch of variables for readability
+
+set_variable MODULE i(4444)
+set_variable INSTANCE i(5555)
+set_variable EVENT i(6666)
+
+# NOTE: the event interface between the nexe and proxy is not strictly
+# following the ppapi model because of performance reasons.
+#
+# The nexe entry point is
+# PPP_InputEvent_HandleInputEvent:iiCC:i
+# Where the arguments are:
+# in:
+# PP_Instance instance:
+# PP_Resource resource:
+# InputEventData event_data:
+# char[] character_text:
+# out:
+# int handled:
+#
+# InputEventData is described in src/shared/ppapi_proxy/input_event_data.h as:
+#
+# struct InputEventData {
+# InputEventData();
+# ~InputEventData();
+#
+# PP_InputEvent_Type event_type;
+# uint32_t event_modifiers;
+# PP_TimeTicks event_time_stamp;
+#
+# PP_InputEvent_MouseButton mouse_button;
+# int32_t mouse_click_count;
+# PP_Point mouse_position;
+#
+# PP_FloatPoint wheel_delta;
+# PP_FloatPoint wheel_ticks;
+# PP_Bool wheel_scroll_by_page;
+#
+# uint32_t key_code;
+# };
+
+# ieee double
+set_variable TIME_1 8:0x3ff0000000000000
+set_variable TIME_2 8:0x3ff1000000000000
+set_variable TIME_3 8:0x3ff2000000000000
+set_variable TIME_4 8:0x3ff3000000000000
+set_variable TIME_5 8:0x3ff4000000000000
+set_variable TIME_6 8:0x3ff5000000000000
+set_variable TIME_7 8:0x3ff6000000000000
+
+# pair of ints
+set_variable COORDS 4:264,4:100
+
+set_variable EV_MOUSE_DOWN R(56,4:0,4:64,${TIME_1},4:0,4:1,${COORDS},8:0,8:0,4:0,4:0)
+set_variable EV_MOUSE_UP R(56,4:1,4:64,${TIME_2},4:0,4:0,${COORDS},8:0,8:0,4:0,4:0)
+
+set_variable EV_MOUSE_MOVE R(56,4:2,4:0,${TIME_3},4:0,4:0,${COORDS},8:0,8:0,4:0,4:0)
+
+set_variable EV_MOUSE_ENTER R(56,4:3,4:0,${TIME_4},4:0,4:0,${COORDS},8:0,8:0,4:0,4:0)
+set_variable EV_MOUSE_LEAVE R(56,4:4,4:0,${TIME_5},4:0,4:0,${COORDS},8:0,8:0,4:0,4:0)
+
+set_variable EV_KEY_DOWN R(56,4:7,4:0,${TIME_6},4:0,4:0,8:0,8:0,8:0,4:0,4:0x54)
+set_variable EV_KEY_UP R(56,4:8,4:0,${TIME_7},4:0,4:0,8:0,8:0,8:0,4:0,4:0x54)
+
+set_variable JS_STR 4:5
+set_variable JS_UND 4:0
+set_variable VAR_UNDEF R(8,${JS_UND},4:0)
+set_variable VAR_CHAR R(16,${JS_STR},4:1,8:0x56)
+
+
+echo
+echo "*** INIT MODULE"
+replay 1 PPB_GetInterface:s:i s("PPB_Core;1.0") * i(1)
+replay 1 PPB_GetInterface:s:i s("PPB_Instance;1.0") * i(1)
+# the results contain a process id which is non-determinisitic
+rpc PPP_InitializeModule hide-results i(0) ${MODULE} h(pepper_desc) s("${service_string}") * i(0) i(0)
+
+
+echo
+echo "*** INIT INSTANCE"
+set_variable TAGS C(12,buffer_size\000)
+set_variable VALUES C(4,100\000)
+replay 1 PPB_GetInterface:s:i s("PPB_InputEvent;1.0") * i(1)
+rpc PPP_Instance_DidCreate ${INSTANCE} i(1) ${TAGS} ${VALUES} * i(0)
+
+replay 1 PPB_GetInterface:s:i s("PPB_Var;1.0") * i(1)
+replay 1 PPB_GetInterface:s:i s("PPB_MouseInputEvent;1.0") * i(1)
+replay 1 PPB_GetInterface:s:i s("PPB_KeyboardInputEvent;1.0") * i(1)
+# These occur once each for each event sent to the nexe
+replay 7 PPB_Core_AddRefResource:i: ${EVENT} *
+replay 7 ReleaseResourceMultipleTimes:ii: ${EVENT} i(1) *
+
+
+echo
+echo "*** SENT EVENTS EV_MOUSE_DOWN"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_MOUSE_DOWN} ${VAR_UNDEF} * i(0)
+echo
+echo "*** SENT EVENTS EV_MOUSE_UP"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_MOUSE_UP} ${VAR_UNDEF} * i(0)
+echo
+echo "*** SENT EVENTS EV_MOUSE_MOVE"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_MOUSE_MOVE} ${VAR_UNDEF} * i(0)
+echo
+echo "*** SENT EVENTS EV_MOUSE_ENTER"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_MOUSE_ENTER} ${VAR_UNDEF} * i(0)
+echo
+echo "*** SENT EVENTS EV_MOUSE_LEAVE"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_MOUSE_LEAVE} ${VAR_UNDEF} * i(0)
+echo
+echo "*** SENT EVENTS EV_KEY_UP"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_KEY_UP} ${VAR_CHAR} * i(0)
+echo
+echo "*** SENT EVENTS EV_KEY_DOWN"
+rpc PPP_InputEvent_HandleInputEvent ${INSTANCE} ${EVENT} ${EV_KEY_DOWN} ${VAR_CHAR} * i(0)
+
+
+echo
+echo "*** TRIGGER EVENT FLUSH"
+replay 1 PPB_GetInterface:s:i s("PPB_Var;1.0") * i(1)
+replay 1 PPB_GetInterface:s:i s("PPB_Messaging;1.0") * i(1)
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(104,\x05\x00\x00\x00_\x00\x00\x005555:_Mouse_event:Down_modifier:left-button-down__button:Left_x:264_y:100_click_count:1_time:1\n\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(112,\x05\x00\x00\x00b\x00\x00\x005555:_Mouse_event:Up_modifier:left-button-down__button:Left_x:264_y:100_click_count:0_time:1.0625\n\x00\x00\x00\x00\x00\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(96,\x05\x00\x00\x00R\x00\x00\x005555:_Mouse_event:Move_modifier:_button:Left_x:264_y:100_click_count:0_time:1.125\n\x00\x00\x00\x00\x00\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(96,\x05\x00\x00\x00T\x00\x00\x005555:_Mouse_event:Enter_modifier:_button:Left_x:264_y:100_click_count:0_time:1.1875\n\x00\x00\x00\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(96,\x05\x00\x00\x00R\x00\x00\x005555:_Mouse_event:Leave_modifier:_button:Left_x:264_y:100_click_count:0_time:1.25\n\x00\x00\x00\x00\x00\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(80,\x05\x00\x00\x00B\x00\x00\x005555:_Key_event:Up_modifier:_key_code:84_time:1.375_text:Var<'V'>\n\x00\x00\x00\x00\x00\x00) *
+replay 1 PPB_Messaging_PostMessage:iC: i(5555) C(80,\x05\x00\x00\x00E\x00\x00\x005555:_Key_event:Down_modifier:_key_code:84_time:1.3125_text:Var<'V'>\n\x00\x00\x00) *
+rpc PPP_Instance_DidChangeFocus ${INSTANCE} b(0) *
+
+
+rpc PPP_ShutdownModule *
+
+echo "DONE"
« no previous file with comments | « ppapi/native_client/tests/ppapi_simple_tests/event.cc ('k') | ppapi/native_client/tests/ppapi_simple_tests/event.stdout » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698