[webkit-changes] cvs commit: WebCore/manual-tests/resources TestApplet.class TestApplet.java liveconnect-security-exception-popup.html

Geoffrey ggaren at opensource.apple.com
Wed Aug 10 18:28:43 PDT 2005


ggaren      05/08/10 18:28:43

  Modified:    .        ChangeLog
  Added:       manual-tests liveconnect-security-exception.html
               manual-tests/resources TestApplet.class TestApplet.java
                        liveconnect-security-exception-popup.html
  Log:
  Bug #:
  
  Revision  Changes    Path
  1.4557    +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4556
  retrieving revision 1.4557
  diff -u -r1.4556 -r1.4557
  --- ChangeLog	11 Aug 2005 01:01:39 -0000	1.4556
  +++ ChangeLog	11 Aug 2005 01:28:34 -0000	1.4557
  @@ -1,3 +1,18 @@
  +2005-08-10  Geoffrey Garen  <ggaren at apple.com>
  +
  +        -added layout test for fix to <rdar://problem/4151132> REGRESSION: Some applet 
  +        liveconnect calls throws privilege exception.
  +        
  +        (See JavaScriptCore Changelog for fix details.)
  +
  +        * manual-tests/liveconnect-security-exception.html: Added.
  +        * manual-tests/resources/TestApplet.class: Added.
  +        * manual-tests/resources/TestApplet.java: Added.
  +        (TestApplet):
  +        (TestApplet.init):
  +        (TestApplet.method):
  +        * manual-tests/resources/liveconnect-security-exception-popup.html: Added.
  +
   2005-08-10  Vicki Murley  <vicki at apple.com>
   
   	Changes from Curt Arnold, reviewed by Vicki.
  
  
  
  1.1                  WebCore/manual-tests/liveconnect-security-exception.html
  
  Index: liveconnect-security-exception.html
  ===================================================================
  <html>
  <head>
  <!--
  Sorry for the hackery in this test. Currently, we have no elegant way to
  catch Java errors and print out an intelligent response.
  -->
  
  <script>
  function loadApplet() {
          // force Safari to load and cache the TestApplet class
          document.getElementById('applet').method();
  }
  </script>
  </head>
  <body onload="loadApplet();window.open('resources/liveconnect-security-exception-popup.html', 'w', 'height=300, width=300');">
  <p>This test checks for a regression against <i>rdar://problem/4151132 REGRESSION: Some applet liveconnect calls throws privilege exception.</i>.</p>
  <p>To test:</p>
  <ol>
  <li>Select the window titled "popup window."</li>
  <li>From the debug menu, select "Show JavaScript console." This will allow you to see errors thrown in the popup window by the Java Virtual Machine. If there are any, the test has failed.</li>
  <li>If the text in the popup window does not match the text below, the test has failed:<br>
  applet.field returned 1<br>
  incremented applet.field by 1<br>
  applet.field returned 2<br>
  applet.method() returned 1<br>
  </li>
  <li>Otherwise, the test has passed.</li>
  </ol>
  <applet id='applet' code="TestApplet.class" codebase="."></applet>
  </body>
  </html>
  
  
  
  1.1                  WebCore/manual-tests/resources/TestApplet.class
  
  	<<Binary file>>
  
  
  1.1                  WebCore/manual-tests/resources/TestApplet.java
  
  Index: TestApplet.java
  ===================================================================
  import java.applet.Applet;
  
  public class TestApplet extends Applet {
      public static int MAGIC_NUMBER = 1;
      public int field;
      
      public void init()
      {
          field = MAGIC_NUMBER;
      }
      
      public int method()
      {
          return MAGIC_NUMBER;
      }
  }
  
  
  1.1                  WebCore/manual-tests/resources/liveconnect-security-exception-popup.html
  
  Index: liveconnect-security-exception-popup.html
  ===================================================================
  <html>
  <head>
  <!--
  Sorry for the hackery in this test. Currently, we have no elegant way to
  catch Java errors and print out an intelligent response.
  -->
  
  <title>popup window</title>
  <script>
  function print(message) {
  	var paragraph = document.createElement("p");
  	paragraph.appendChild(document.createTextNode(message));
  	document.getElementById("console").appendChild(paragraph);
  }
  
  function test() {
  	if (window.layoutTestController) {
  		layoutTestController.dumpAsText();
  	}
  
      print(
          "applet.field returned " + 
          document.getElementById('applet').field
          );
  
      document.getElementById('applet').field += 1;
      print(
          "incremented applet.field by 1"
          );
          
      print(
          "applet.field returned " + 
          document.getElementById('applet').field
          );
  
      print(
          "applet.method() returned " + 
          document.getElementById('applet').method()
          );
  }
  </script>
  </head>
  <body onload="test();">
  <applet id='applet' code="TestApplet.class" codebase="."></applet>
  <div id='console'/>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list