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.



Object Tag with Align Attribute Test


This test case tests the OBJECT tag with its optional ALIGN attribute.

Test Instructions:

  1. Verify that the sample java applet displays as stated in each of the following test cases:
  2. Test Case #1 sample displaying horizontal alignment of a java applet with surrounding text
    Test Case #2 sample displaying vertical alignment of a java applet with surrounding text

  3. Verify that the java applet is maintained when you minimize/maximize the screen.
  4. Verify that the java applet is maintained when you re-size left & right the screen.
  5. Verify that the java applet is maintained when you re-size top & bottom the screen.
  6. Verify re-draw takes place correctly after maximizing the screen.
  7. Verify reload works.

Test Case #1: sample displaying horizontal alignment of a java applet with surrounding text
(using <APPLET CODEBASE=class pathname CODE="class name" ALIGN=left|right> text </APPLET>)

Horizontally Aligned "Left" and "Right" Java Applet with Surrounding Text

Java Applet with the alignment values "left" or "right" are floating java applet types. An ALIGN=left java applet will float down and over to the left margin (into the next available space there) and subsequent text will wrap around the right hand side of that java applet. This text should be alongside a java applet on the left margin.

Likewise for ALIGN=right, the java applet aligns with the right margin and the text wraps around the left margin. All of this text should be wrapping around the side of the java applet aligned against the right margin of the page. If the java applet is not on the right margin, and this text is not wrapped around the left side, then ALIGN=right is broken.

What happens is that, while text is flowing around an java applet, the left (or right) margin of the page is temporarily redefined to be adjacent to the java applet as opposed to the edge of the page. This means that subsequent java applet with the same alignment will stack up against each other.

The following shows staggered "left" aligned java applet:

    Java Applet!

    next in line!

    next in line!


When the text flows beyond the bottom of the java applet, the margin returns to it former position, typically at the edge of the browser window.

Test Case #2: sample displaying vertical alignment of a java applet with surrounding text
(using <APPLET CODEBASE=class pathname CODE="class name" ALIGN=TOP|MIDDLE|BOTTOM|TEXTTOP|ABSMIDDLE|BASELINE|ABSBOTTOM> text </APPLET>)

Vertically Aligned Java Applet with Surrounding Text

ALIGN=TOP, the java applet aligns with the Tallest item in the line.

ALIGN=MIDDLE, the middle of the java applet aligns with the of the middle of the text.

ALIGN=ABSMIDDLE, the middle of the java applet aligns with the of the middle of the Largest item in the line.

ALIGN=BASELINE (same as ALIGN=BOTTOM), the bottom of the java applet bottom aligns with the of the baseline of the text.

ALIGN=ABSBOTTOM, the bottom of the java applet aligns with the of the lowest item in the line.