1 This README file indicates steps required for Building and Execution of OJI API tests
5 These OJI API Tests basically 4 areas via:
6 Java Native Interface (JNI)
8 Thread Manager Tests (TM)
9 LiveConnect Manager Tests (LCM)
11 On Building the Test Base ( from build directory) 5 shared libraries are
12 created which are copied over to the bin/components dir.
13 ( libojiapijmtests.so,libojiapilcmtests.so, libojiapitmtests.so,
14 libojiapijnitests.so, libojiapitl.so )
16 On Invoking the browser, it registers all these libraries and then invokes
17 the page test.html (in script dir.)
19 It first prompts a dialog box for Permissions to invoke a XPConnect call.
20 The user has to grant permissions to execute the tests.
21 (NOTE: If user denys, then the tests cannot be invoked)
23 Once permissions are granted, it will follow these steps
24 * Create a TestLoader instance.
25 * Read List of Tests from file OJITestsList.lst (in script dir.)
26 * For each test entry in that file, determine type of Test (JNI/JM/LCM/TM)
27 * Load appropriate library if not already loaded
28 * Find method address from the loaded library
29 * Invoke method to be tested with appropriate test parameters
30 * Record results in log file
32 Below are instructions on how to build and execute.
33 Also check FAQ for answers to known problems encountered.
35 -------------------------------------------------------------------------------
37 Instructions (Build/Execution)
38 ==============================
43 ============-=============
44 I. Build OJI API test:
45 ==========================
47 Pre-Requisite: You must have built mozilla browser and
48 have Perl (version >= 5) installed.
50 1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
51 2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/win32_O.obj/bin directory
52 where mozilla.exe is located
53 3. goto build directory and say
56 Libraries created are located in 'build/bin' dir. and
57 MOZILLA_FIVE_HOME/components directory.
59 =============================
60 II.Execute OJI API tests:
61 =============================
63 Pre-Requisite: Have Perl (version >= 5) installed and
64 Java1.3.0_01 SDK installed.
66 1. Update <homedir>/Program Files/Users50/<profile dir>/prefs.js to add line
67 user_pref("signed.applets.codebase_principal_support",true);
68 where <profile dir> is your profile name
69 2. Update Path variable to include
70 $MOZILLA_HOME/dist/win32_O.obj/bin and
71 $MOZILLA_HOME/dist/win32_O.obj/bin/components
72 3. Set TEST_URL to point to url location of test.html.
73 (file://<mozilla dir>/modules/oji/tests/script)
74 4. Delete component.reg file in Mozilla's bin directory.
75 5. Click on Start-Settings-Control Panel->Duke icon.
76 This will invoke the Java Plugin Control Panel
77 6. In Runtime Parameter Text Field add the following line
78 -Xbootclasspath/a:<class dir>
79 where <class dir> is <MOZILLA_HOME>\modules\oji\tests\build\classes
80 7. Create .java.policy file in you home directory and add this line
82 permission java.security.AllPermission;
84 8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
85 takes more time to load. It should be a value greater than 0.
86 9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
88 10. Goto script dir. and run perl script
90 11. It will invoke the browser and load 'test.html'.
91 12. It should prompt a "Internet Security" Dialog box prompting for Permissions
92 Check "Remember the decision" checkbox.
93 Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
96 See results of execution in the script/log directory.
97 Output HTML file is script/log/BWTest.html
101 --------------------------------------------------------------------------
105 ==========================
106 I. Build OJI API test:
107 ==========================
109 Pre-Requisite: You must have built mozilla browser and have
110 have Perl (version >= 5) installed.
112 1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
113 2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/bin
114 where mozilla-bin is located
115 3. set CC to point to gcc
117 4. goto build directory and say
120 Libraries created are located in 'build/bin' dir. and
121 MOZILLA_FIVE_HOME/components directory.
123 =============================
124 II. Execute OJI API tests:
125 =============================
127 Pre-Requisite: Have Perl installed and Java2 SDK installed.
129 1. Update <home dir>/.mozilla/<profile dir>/prefs.js to add line
130 user_pref("signed.applets.codebase_principal_support",true);
131 where <profile dir> is your profile name
132 2. Update LD_LIBRARY_PATH variable to include
133 $MOZILLA_HOME/dist/bin and
134 $MOZILLA_HOME/dist/bin/components
135 3. Set TEST_URL to point to url location of test.html.
136 (file://<mozilla dir>/modules/oji/tests/script)
137 4. Delete component.reg file in Mozilla's bin directory.
138 5. Invoke <Java2 SDK dir.>/jre/bin/ControlPanel
139 6. In RunTime Parameter Text Field add the following line
140 -Xbootclasspath/a:<class dir>
141 where <class dir> is <MOZILLA_HOME>/modules/oji/tests/build/classes
143 7. Create .java.policy file in you home directory and add the lines
145 permission java.security.AllPermission;
147 8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
148 takes more time to load. It should be a value greater than 0.
149 9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
150 profile (by default it uses default).
151 10. Goto script dir. and run perl script
153 11. It will invoke the browser and load 'test.html'.
154 12. It should prompt a "Internet Security" Dialog box prompting for Permissions
155 Check "Remember the decision" checkbox.
156 Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
160 See results of execution in the script/log directory.
161 Output HTML file is script/log/BWTest.html
164 --------------------------------------------------------------------------
168 Currently does not work with Mac.