OLD | NEW |
(Empty) | |
| 1 # define a bunch of variables for readability |
| 2 |
| 3 set_variable MODULE i(4444) |
| 4 set_variable INSTANCE i(5555) |
| 5 |
| 6 # Tags used by pepper/srpc to marshall js parameters |
| 7 set_variable JS_STR 4:5 |
| 8 set_variable JS_INT 4:2 |
| 9 |
| 10 # NOTE: the strings below must not contain unescaped spaces or commas |
| 11 set_variable ARG_loadUrl ${JS_STR},4:7,"loadUrl",1:0 |
| 12 set_variable ARG_ReportResult ${JS_STR},4:12,"ReportResult",4:0 |
| 13 |
| 14 set_variable ARG_URL ${JS_STR},4:32,"http://www.google.com/robots.txt" |
| 15 |
| 16 set_variable ARG_ERR1 ${JS_STR},4:38,"PPB_URLLoader::Open:\x20PP_ERROR_NOACCESS"
,2:0 |
| 17 set_variable ARG_ERR2 ${JS_STR},4:34,"PPB_URLRequestInfo::Create:\x20failed",6:0 |
| 18 set_variable ARG_GET ${JS_STR},4:3,"GET",5:0 |
| 19 |
| 20 set_variable ARG_SUCC ${JS_STR},4:12,"hello\x20world!",4:0 |
| 21 set_variable ARG_0 ${JS_INT},4:0 |
| 22 set_variable ARG_1 ${JS_INT},4:1 |
| 23 |
| 24 set_variable WINDOW R(24,8:6,8:0x9f,8:0x5f29) |
| 25 # TODO(robertm) figure out what this represents, maybe PP_Var |
| 26 set_variable EXCEPTION R(8,8:0) |
| 27 set_variable NULL R(8,8:0) |
| 28 |
| 29 echo |
| 30 echo "*** INIT MODULE" |
| 31 replay 99 PPB_GetInterface:s:i s("PPB_Core;1.0") * i(1) |
| 32 replay 99 PPB_GetInterface:s:i s("PPB_Instance;1.0") * i(1) |
| 33 replay 99 PPB_GetInterface:s:i s("PPB_Var;1.0") * i(1) |
| 34 # the results contain a process id which is non-determinisitic |
| 35 rpc PPP_InitializeModule hide-results i(0) ${MODULE} h(pepper_desc) s("${service
_string}") * i(0) i(0) |
| 36 |
| 37 echo |
| 38 echo "*** TRIGGER REPAINT" |
| 39 rpc PPP_Instance_DidChangeView ${INSTANCE} I(4,8,79,400,400) I(4,0,0,400,400) * |
| 40 # leave time for flush of stdout |
| 41 |
| 42 ###################################################################### |
| 43 ## URL |
| 44 ###################################################################### |
| 45 echo |
| 46 echo "*** CALL loadUrl(): url2 as buffer - expected to fail" |
| 47 replay 1 PPB_GetInterface:s:i s("PPB_URLRequestInfo;1.0") * i(1) |
| 48 replay 1 PPB_GetInterface:s:i s("PPB_URLResponseInfo;1.0") * i(1) |
| 49 replay 1 PPB_GetInterface:s:i s("PPB_URLLoader;1.0") * i(1) |
| 50 replay 1 PPB_GetInterface:s:i s("PPB_FileIO;1.0") * i(1) |
| 51 |
| 52 replay 1 PPB_FileIO_Create:i:i ${INSTANCE} * i(35) |
| 53 replay 1 PPB_URLRequestInfo_Create:i:i ${INSTANCE} * i(40) |
| 54 replay 1 PPB_URLLoader_Create:i:i ${INSTANCE} * i(44) |
| 55 |
| 56 replay 1 PPB_FileIO_IsFileIO:i:i i(35) * i(1) |
| 57 replay 1 PPB_URLRequestInfo_IsURLRequestInfo:i:i i(35) * i(0) |
| 58 replay 1 PPB_URLResponseInfo_IsURLResponseInfo:i:i i(35) * i(0) |
| 59 replay 1 PPB_URLLoader_IsURLLoader:i:i i(35) * i(0) |
| 60 |
| 61 replay 1 PPB_FileIO_IsFileIO:i:i i(40) * i(0) |
| 62 replay 1 PPB_URLRequestInfo_IsURLRequestInfo:i:i i(40) * i(1) |
| 63 replay 1 PPB_URLResponseInfo_IsURLResponseInfo:i:i i(40) * i(0) |
| 64 replay 1 PPB_URLLoader_IsURLLoader:i:i i(40) * i(0) |
| 65 |
| 66 replay 1 PPB_FileIO_IsFileIO:i:i i(44) * i(0) |
| 67 replay 1 PPB_URLRequestInfo_IsURLRequestInfo:i:i i(44) * i(0) |
| 68 replay 1 PPB_URLResponseInfo_IsURLResponseInfo:i:i i(44) * i(0) |
| 69 replay 1 PPB_URLLoader_IsURLLoader:i:i i(44) * i(1) |
| 70 |
| 71 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(40) i(0) R(40,${ARG_URL}) * i(1) |
| 72 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(40) i(1) R(16,${ARG_GET}) * i(1) |
| 73 replay 1 PPB_URLRequestInfo_SetProperty:iiC:i i(40) i(3) R(8,${ARG_0}) * i(1) |
| 74 |
| 75 replay 1 PPB_URLLoader_Open:iii:i i(44) i(40) i(1) * i(-7) |
| 76 |
| 77 replay 1 PPB_Core_ReleaseResource:i: i(35) * |
| 78 replay 1 PPB_Core_ReleaseResource:i: i(40) * |
| 79 replay 1 PPB_Core_ReleaseResource:i: i(44) * |
| 80 rpc Call ${OBJECT} R(16,${ARG_loadUrl}) i(2) R(48,${ARG_URL},${ARG_0}) ${NULL} *
C(8) C(8) |
| 81 |
| 82 ###################################################################### |
| 83 ## EPILOG |
| 84 ###################################################################### |
| 85 echo |
| 86 echo "*** DONE" |
| 87 rpc PPP_ShutdownModule * |
OLD | NEW |