| OLD | NEW |
| (Empty) |
| 1 # To be used with | |
| 2 # sel_universal_ppapi_replay_prolog.stdin | |
| 3 # define a bunch of variables for readability | |
| 4 | |
| 5 # NOTE: this test exercises the request.SetStreamToFile(false) case | |
| 6 | |
| 7 set_variable MODULE i(4444) | |
| 8 set_variable INSTANCE i(5555) | |
| 9 | |
| 10 # Tags used by pepper/srpc to marshall js parameters | |
| 11 set_variable JS_STR 4:5 | |
| 12 set_variable JS_INT 4:2 | |
| 13 | |
| 14 # NOTE: the strings below must not contain unescaped spaces or commas | |
| 15 | |
| 16 set_variable FILE_DATA1 C(6,hello\x20) | |
| 17 set_variable FILE_SIZE1 i(6) | |
| 18 set_variable FILE_DATA2 C(6,world!) | |
| 19 set_variable FILE_SIZE2 i(6) | |
| 20 | |
| 21 set_variable PARAM_STR_URL R(24,${JS_STR},4:10,"myurl.html",6:0) | |
| 22 set_variable PARAM_STR_GET R(16,${JS_STR},4:3,"GET",5:0) | |
| 23 set_variable PARAM_NUM_0 R(8,${JS_INT},4:0) | |
| 24 set_variable PARAM_NUM_1 R(8,${JS_INT},4:1) | |
| 25 set_variable PARAM_STATUS R(8,4:3,4:200) | |
| 26 | |
| 27 set_variable NUM_TAGS i(3) | |
| 28 set_variable TAGS C(23,chunk_size\000url\000to_file\000) | |
| 29 set_variable VALUES C(16,10\000myurl.html\0000\000) | |
| 30 | |
| 31 set_variable COMPLETE R(24,${JS_STR},4:14,"5555: COMPLETE",2:0) | |
| 32 | |
| 33 ###################################################################### | |
| 34 | |
| 35 # These replays are too common to list them separately | |
| 36 # TODO(robertm): make the counts tight, eliminate PPB_Var ASAP | |
| 37 | |
| 38 replay 1 PPB_GetInterface:s:i s("PPB_Messaging;1.0") * i(1) | |
| 39 replay 1 PPB_GetInterface:s:i s("PPB_Core;1.0") * i(1) | |
| 40 replay 1 PPB_GetInterface:s:i s("PPB_Var;1.0") * i(1) | |
| 41 replay 1 PPB_GetInterface:s:i s("PPB_URLRequestInfo;1.0") * i(1) | |
| 42 replay 1 PPB_GetInterface:s:i s("PPB_URLResponseInfo;1.0") * i(1) | |
| 43 replay 1 PPB_GetInterface:s:i s("PPB_URLLoader;1.0") * i(1) | |
| 44 | |
| 45 ###################################################################### | |
| 46 | |
| 47 echo | |
| 48 echo "*** INIT MODULE" | |
| 49 # the results contain a process id which is non-determinisitic | |
| 50 rpc PPP_InitializeModule hide-results i(0) ${MODULE} h(pepper_desc) s("${service
_string}") * i(0) i(0) | |
| 51 | |
| 52 echo | |
| 53 echo "*** Load URL" | |
| 54 replay 1 PPB_URLRequestInfo_Create:i:i ${INSTANCE} * i(30) | |
| 55 replay 1 PPB_URLLoader_Create:i:i ${INSTANCE} * i(34) | |
| 56 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(30) i(0) ${PARAM_STR_URL} * i(1) | |
| 57 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(30) i(1) ${PARAM_STR_GET} * i(1) | |
| 58 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(30) i(3) ${PARAM_NUM_0} * i(1) | |
| 59 replay 1 PPB_URLLoader_Open:iii:i i(34) i(30) i(1) * i(-1) | |
| 60 replay 1 PPB_Core_ReleaseResource:i: i(30) * | |
| 61 rpc PPP_Instance_DidCreate ${INSTANCE} ${NUM_TAGS} ${TAGS} ${VALUES} * i(0) | |
| 62 | |
| 63 echo | |
| 64 echo "*** async Open Callback" | |
| 65 replay 1 PPB_URLLoader_GetResponseInfo:i:i i(34) * i(38) | |
| 66 replay 1 PPB_URLResponseInfo_GetProperty:ii:C i(38) i(3) * ${PARAM_STATUS} | |
| 67 replay 1 PPB_URLLoader_ReadResponseBody:iii:Ci i(34) i(10) i(2) * C(0,) i(-1) | |
| 68 replay 1 PPB_Core_ReleaseResource:i: i(38) * | |
| 69 rpc RunCompletionCallback i(1) i(0) C(0,) * | |
| 70 | |
| 71 echo | |
| 72 echo "*** async ReaderResponseBody Callback (first 6 bytes)" | |
| 73 replay 1 PPB_URLLoader_ReadResponseBody:iii:Ci i(34) i(10) i(3) * C(0,) i(-1) | |
| 74 rpc RunCompletionCallback i(2) ${FILE_SIZE1} ${FILE_DATA1} * | |
| 75 | |
| 76 echo | |
| 77 echo "*** async ReaderResponseBody Callback (second 6 bytes)" | |
| 78 replay 1 PPB_URLLoader_ReadResponseBody:iii:Ci i(34) i(10) i(4) * C(0,) i(-1) | |
| 79 rpc RunCompletionCallback i(3) ${FILE_SIZE2} ${FILE_DATA2} * | |
| 80 | |
| 81 echo | |
| 82 echo "*** async ReaderResponseBody Callback (eof - 0 bytes)" | |
| 83 replay 1 PPB_Messaging_PostMessage:iC: ${INSTANCE} ${COMPLETE} * | |
| 84 rpc RunCompletionCallback i(4) i(0) C(0,) * | |
| 85 | |
| 86 echo | |
| 87 echo "*** DONE" | |
| 88 rpc PPP_ShutdownModule * | |
| OLD | NEW |