File: samplescript.txt

package info (click to toggle)
iceweasel 2.0.0.19-0etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 298,784 kB
  • ctags: 317,912
  • sloc: cpp: 1,796,902; ansic: 987,677; xml: 109,036; makefile: 47,777; asm: 35,201; perl: 26,983; sh: 20,879; cs: 6,232; java: 5,513; python: 3,249; pascal: 459; lex: 306; php: 244; csh: 132; objc: 97; yacc: 79; ada: 49; awk: 14; sql: 4; sed: 4
file content (171 lines) | stat: -rw-r--r-- 4,021 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This is a sample NPAPI plugin script file with all NPAPI calls present.
;;
;;
;; [Options] section specifies how to conduct the script.
;; 'first' key says from where to start the script (default 1).
;; 'last' key MUST present, and it says when to stop the script cycle.
;; All sections with numbers less than that of specified in the 'first' key and 
;; more than that of specified in the 'last' key are ignored by the script 
;; reading code.
;; So you can pick any part of existing long script for executing.
;;
;; Two other keys are optional, 'repetitions' being the number of times
;; the script cycle is going to be executed (default 1), and 'delay' being
;; the time delay in milliseconds between cycle repetitions (default 0)
;;
;; ['Numeric'] sections are actual script, each representing one NPAPI call.
;; Calls will be executed in their numeric order, some numbers could be
;; missing, so you can start to write your script with numbers multiple
;; by say ten in order to be able to insert new script items later.
;;
;; 'arg*' keys represent NPAPI function call arguments and they depend on
;; actual call. 
;;
;; In some cases you may not specify an argument if you have no control
;; over it. E.g. pointer to the plugin instance or pointer to a stream
;; created by NPN_NewStream. Scripter code will pick up right ones for you.
;; If you specify them explicitely it will take them but be prepared for
;; boom. This is appropriate if you want to test an API call with invalid
;; arguments.
;;
;; String should can be represented by actual string.
;;
;; Arguments other than numeric like NPPVariable, NPReason etc. should be 
;; represented by their enum types from npapi.h like NPPVpluginNameString 
;; or NPRES_DONE. Also NPBool should read TRUE or FALSE
;;
;; If you want to test real numeric values in place of this args, say
;; 0x00000000 for string pointers, use a special prefix '_true_numeric_value_'
;; The following example will execute NPN_GetURL(instance, -1, "some_target")
;; with real instance, invalid URL and valid target:
;;
;;    [1]
;;    APICall=NPN_GetURL
;;    arg2=true_numeric_value_-1
;;    arg3=some_target
;;
;; The latter is also true for NPBool, NPReason, NPNVariable ans NPPVariable.
;;
;; In case of NPRect* or NPSize* type of argument you can use either arg*=0x0000
;; (or any other value) or not using arg* use top=..., left=..., right=...,
;; bottom=... or width=..., height=...
;;
;; All these sections may also contain 'delay' key (default 0) which would insert
;; sleep time (in ms) after the corresponding call.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Options]
first=1
last=23
repetitions=1
delay=0

[1]
APICall=NPN_Version
delay=0

[2]
APICall=NPN_GetURL
arg2=http://mozilla.org
arg3=_npapi_Display

[3]
APICall=NPN_GetURLNotify
arg2=http://mozilla.org
arg3=_npapi_Display
arg4=1

[4]
APICall=NPN_PostURL
arg2=http://mozilla.org
arg3=_npapi_Display
arg4=4
arg5=test
arg6=FALSE

[5]
APICall=NPN_PostURLNotify
arg2=http://mozilla.org
arg3=_npapi_Display
arg4=4
arg5=test
arg6=FALSE
arg7=1

;[6]
;APICall=NPN_RequestRead

[7]
APICall=NPN_NewStream
arg2=text/plain
arg3=_npapi_Display

[8]
APICall=NPN_Write
arg3=21
arg4=this is a test string

[9]
APICall=NPN_DestroyStream
arg3=NPRES_DONE

[10]
APICall=NPN_Status
arg2=Some message

[11]
APICall=NPN_UserAgent

[12]
APICall=NPN_MemAlloc
arg1=256

[13]
APICall=NPN_MemFree

[14]
APICall=NPN_MemFlush
arg1=256

[15]
APICall=NPN_ReloadPlugins
arg1=TRUE

[16]
APICall=NPN_GetJavaEnv

[17]
APICall=NPN_GetJavaPeer

[18]
APICall=NPN_GetValue
arg2=NPNVnetscapeWindow

[19]
APICall=NPN_SetValue
arg2=NPPVpluginNameString
arg3=NPAPI Tester Plugin

;; Case for setting new embed size
[20]
APICall=NPN_SetValue
arg2=NPPVpluginWindowSize
width=200
height=400

[21]
APICall=NPN_InvalidateRect
top=0
left=0
right=200
bottom=100

[22]
APICall=NPN_InvalidateRegion
arg2=0

[23]
APICall=NPN_ForceRedraw