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

Unified Diff: ppapi/native_client/tests/ppapi_simple_tests/ppapi_emu_file.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/ppapi_emu_file.stdin
===================================================================
--- ppapi/native_client/tests/ppapi_simple_tests/ppapi_emu_file.stdin (revision 0)
+++ ppapi/native_client/tests/ppapi_simple_tests/ppapi_emu_file.stdin (revision 0)
@@ -0,0 +1,52 @@
+# define a bunch of variables for readability
+
+set_variable MODULE i(4444)
+set_variable INSTANCE i(5555)
+# NOTE: width and height must match the image_data and
+# graphic_2d object requests that the nexe makes
+set_variable WIDTH 1000
+set_variable HEIGHT 700
+
+echo
+echo "*** INITIALIZE PEPPER EMULATION"
+# this registers the currently supported PPB_xxx rpcs
+pepper_emu_initialize ${INSTANCE} ${WIDTH} ${HEIGHT} demo
+echo
+
+echo
+echo "*** CREATE UPCALL SERVICE"
+# advertise the registered rpcs to the nexe
+install_upcalls service_string pepper_desc
+# the variable service string is very long and might change so we suppress it
+nondeterministic s("${service_string}") @LENGTHY_SERVICE_STRING
+
+echo
+echo "*** INIT MODULE"
+rpc PPP_InitializeModule hide-results i(0) ${MODULE} h(pepper_desc) s("${service_string}") * i(0) i(0)
+
+echo
+echo "*** CHECK INSTANCE CREATION"
+# many nexes uses this to trigger instance initialization
+set_variable TAGS C(30,url\000to_file\000chunk_size\000pdebug\000)
+set_variable VALUES C(18,test.txt\0000\0001024\0001\000)
+set_variable NUM_TAGS i(4)
+rpc PPP_Instance_DidCreate ${INSTANCE} ${NUM_TAGS} ${TAGS} ${VALUES} * i(0)
+
+echo
+echo "*** TRIGGER REPAINT"
+rpc PPP_Instance_DidChangeView ${INSTANCE} I(4,8,79,${WIDTH},${HEIGHT}) I(4,0,0,${WIDTH},${HEIGHT}) *
+
+# make sure we terminate when seeing the string "5555: COMPLETE" send via
+# PostMessage by the nexe when it has fully read the file
+echo
+echo "REGISTER TERMINATION MESSAGE"
+pepper_emu_set_quit_message "5555: COMPLETE"
+
+echo
+echo "*** ENTER EVENT LOOP"
+# wait for events and handle them until we see the "quit_message"
+pepper_emu_event_loop 0 100000
+
+######################################################################
+## EPILOG
+######################################################################

Powered by Google App Engine
This is Rietveld 408576698