You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



You are here: Test Case Description for applets within <applet> tag > Test Case #4 for applets within <applet>: code attribute

Applets: APPLET (CODE)

This test case tests the <applet> tag with its mandatory CODE attribute which specifies the name of the java applet. This can either be a simple class name, or a package path and class name that a java-capable browser is to run. Packages are groups of Java classes. A package name is a like an Internet hostname, in that they both use a heirarchical, dot-seperated naming convention. A Java class file can be identified by its full name by prefixing the class name with the package name.

Test Instructions

  1. Verify that the sample java applet displays as stated in each of the following test cases:
  2. Verify that the java applet is maintained when you minimize/maximize the screen.
  3. Verify that the java applet is maintained when you re-size left & right the screen.
  4. Verify that the java applet is maintained when you re-size top & bottom the screen.
  5. Verify re-draw takes place correctly after maximizing the screen.
  6. Verify reload works.

Test Case #1: sample displaying an APPLET without CODEBASE is relative to the current document URL
(using <applet code="class name"> </applet>)

The APPLET runs from the "current document URL" when codebase is not used

Test Case #2: sample displaying an APPLET is relative to CODEBASE
(using <applet codebase=relative class pathname code="class name"> </applet>)

The APPLET runs from a "URL" relative to the codebase relative class pathname

Test Case #3: sample displaying CODE cannot be an absolute URL
(using <applet code=absolute class pathname/class name> </applet>)

The APPLET cannot run from a code with absolute class pathname

Test Case #4: sample displaying an APPLET with a package name and class name
(using <applet codebase=file pathname code=package-name.class-name> </applet>)

The APPLET runs from a package.class pathname

The local time is...

applet shows the local time, that is the time of the place where the applet is being shown, not the time of the place where the applet is from (which would be confusing).