changeset 7091:d7f3d5659c46

8005922: TEST_BUG: There is no /tmp directory for windows system. Reviewed-by: weijun
author juh
date Fri, 03 May 2013 15:04:54 -0700
parents fc156b925259
children 398fe07f530f
files test/sun/security/tools/policytool/ChangeUI.html test/sun/security/tools/policytool/UpdatePermissions.html test/sun/security/tools/policytool/i18n.html
diffstat 3 files changed, 38 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/tools/policytool/ChangeUI.html	Fri May 03 10:57:28 2013 -0700
+++ b/test/sun/security/tools/policytool/ChangeUI.html	Fri May 03 15:04:54 2013 -0700
@@ -4,7 +4,7 @@
 <applet width=100 height=100 code=ChangeUI.class>
 </applet>
 
-<b>ATTENTION:</b> policytool now contains no platform-specific codes anymore and 
+<b>ATTENTION:</b> policytool now contains no platform-specific codes anymore and
 should behaves exactly the same across all platforms. This also means:
 <ol>
     <li>You may only need to test it on one platform</li>
@@ -16,7 +16,8 @@
 reading these instructions.<br><br>
 
 First, policytool will be invoked.<br><br>
-<ol>
+<ol start="0">
+<li>If testing on Windows, create a temporary directory. (Example: C:\foo\tmp)
 <li>Add new policy entry
 <li>Add permission:
     <pre>
@@ -27,7 +28,7 @@
         <li>Press OK</li>
         <li>Confirm the file name warning dialog appears</li>
         <li>Choose Retain, confirm the permission edit dialog is closed</li>
-        <li>Double click the newly craeted FilePermission entry to edit it</li>
+        <li>Double click the newly created FilePermission entry to edit it</li>
         <li>Press OK</li>
         <li>Confirm the file name warning dialog appears</li>
         <li>Choose Edit, confirm the permission edit dialog is still opened</li>
@@ -54,15 +55,17 @@
     AllPermission
     </pre>
 <li>Add a new Principal, say, KerberosPrincipal with Principal Name as aaa
-<li>Confirm there is 1 entry in the Pricipals list
+<li>Confirm there is 1 entry in the Principals list
 <li>Confirm there are 3 entries in the permission list
 <li>Press cancel
 <li>Double click the policy entry to edit it
-<li>Confirm there is ZERO entry in the Pricipals list
+<li>Confirm there are ZERO entries in the Principals list
 <li>Confirm there are 2 entries in the permission list
 <li>Press cancel
-<li>Save as /tmp/p
-<li>Confirm that the file /tmp/p looks like
+<li>Save as "/tmp/p"<br>
+If testing on Windows, save in the temporary directory created in Step 0.
+(Example: Save as "C:\foo\tmp\p.policy")
+<li>Confirm that the file /tmp/p (or C:\foo\tmp\p.policy) looks like
 <pre>
 /* AUTOMATICALLY GENERATED ON Tue Jul 19 16:27:30 CST 2005*/
 /* DO NOT EDIT */
--- a/test/sun/security/tools/policytool/UpdatePermissions.html	Fri May 03 10:57:28 2013 -0700
+++ b/test/sun/security/tools/policytool/UpdatePermissions.html	Fri May 03 15:04:54 2013 -0700
@@ -10,6 +10,8 @@
 First, policytool will be invoked.<br><br>
 
 Then, follow these steps:<br>
+0) If testing on Windows, create a temporary directory.
+(Example: C:\foo\tmp)<br><br>
 1) Click on the "Add Policy Entry" button in the
 main policytool window.<br><br>
 
@@ -29,13 +31,18 @@
 select "Save As".<br><br>
 
 8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
-and click "OK".<br><br>
+and click "OK".<br>
+If testing on Windows, use the temporary directory created in Step 0.
+(Example: Save as "C:\foo\tmp\ptool.test")<br><br>
 
-9) cat /tmp/ptool.test<br><br>
+9) cat /tmp/ptool.test<br>
+If testing on Windows, check the contents of the file created in the previous
+step.<br><br>
+
 
 10) check to make sure that the new entry is in the policy file.<br><br>
 
-11) repeat steps 1-9 for:<br>
+11) repeat steps 1-10 for:<br>
 	AWTPermission:		readDisplayPixels<br>
 	NetPermission:		specifyStreamHandler<br>
 	RuntimePermission:	setContextClassLoader,
@@ -46,7 +53,8 @@
 
 In the confirmation dialog pop-up, click "OK".<br><br>
 
-Exit policytool.<br><br>
+Exit policytool. If testing on Windows, delete the temporary directory and its
+contents created during this test.<br><br>
 
 Press "Pass" if ... press "Fail" otherwise.<br><br>
 
--- a/test/sun/security/tools/policytool/i18n.html	Fri May 03 10:57:28 2013 -0700
+++ b/test/sun/security/tools/policytool/i18n.html	Fri May 03 15:04:54 2013 -0700
@@ -17,7 +17,8 @@
 <p>
 Press "Pass" if ... press "Fail" otherwise.
 <p>
-<ol>
+<ol start="0">
+<li> If testing on Windows, create a temporary directory. (Example: C:\foo\tmp)
 <li> Pull down the 'File' and 'KeyStore' menus and check values
 <li> Pull down 'File' menu and select 'View Warning Log'.  Confirm FileNotFound.
 <li> Pull down 'File' menu and select 'New'.
@@ -54,14 +55,17 @@
 <li> Do not remove the entry, click 'Cancel'.
 <li> Pull down 'File' menu and select 'Exit'.  Confirm Save option.
 	Click 'Cancel'.
-<li> Select 'File' menu value 'Save', enter "/tmp/policy1" as the filename,
-	and check status message
+<li> Select 'File' menu value 'Save' and enter "/tmp/policy1" as the filename.<br>
+     If testing on Windows, use the temporary directory created in Step 0.
+        (Example: Save as "C:\foo\tmp\policy1")<br>
+     Check status message.
 <li> Select 'File' menu value 'New'
 <li> Click 'Add Policy Entry', type in "hello" for 'SignedBy' field,
 	click 'Done'.  Confirm warning.
 <li> Select 'File' menu value 'Open' and confirm save option
 	(do not save changes)
-<li> Type "/tmp/policy1" for the filename and confirm warning message
+<li> Type "/tmp/policy1" (if Windows, "C:\foo\tmp\policy1") for the filename
+        and confirm warning message<br>
 <li> Pull down 'File' menu, select 'View Warning Log'
 	and confirm KeyStore alias warning
 <li> Pull down 'KeyStore' menu and select 'Edit'
@@ -80,11 +84,13 @@
 <li> Pull down 'KeyStore' menu and select 'Edit'
 <li> Confirm URL, Type, Provider, and Password URL values.
 <li> Click OK
-<li> Pull down 'File' menu and select 'Save As'.  Enter /tmp/policy2.
-	Confirm status message.
+<li> Pull down 'File' menu and select 'Save As'.  Enter "/tmp/policy2"
+        (if Windows, "C:\foo\tmp\policy2").
+	Confirm status message.<br>
 <li> Pull down 'File' menu and select 'New'.
-<li> Pull down 'File' menu and select 'Open'.  Enter /tmp/policy2.
-	Confirm warning message.
+<li> Pull down 'File' menu and select 'Open'.  Enter "/tmp/policy2"
+        (if Windows, "C:\foo\tmp\policy2").
+	Confirm warning message.<br>
 <li> Click on 'Add Policy Entry', enter Codebase 'http://foo',
 	SignedBy 'bar'.  Click on 'Done' and confirm alias warning.
 <li> Double-Click on just created policy entry, confirm edit window appears.
@@ -115,6 +121,8 @@
 <li> Confirm entries in main window listing.
 <li> Select 'File' menu value 'Exit'
 <li> Save Changes, confirm status message.
+<li> If testing on Windows, delete the temporary directory and its contents
+        created during this test.
 </ol>
 <p>