jmitchell    2003/03/11 16:33:59

  Added:       web/test/test/org/apache/struts/taglib/html TestImgTag1.jsp
                        TestImgTag1a.jsp TestImgTag2.jsp TestImgTag3.jsp
                        TestImgTag3a.jsp TestImgTag4.jsp
  Log:
  New tests
  
  Revision  Changes    Path
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag1.jsp
  
  Index: TestImgTag1.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <!-- --------Testing attributes using page------ -->
  <logic:equal name="runTest" value="testImgPageAlign1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="left"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="left">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="right"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="right">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign3">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="top"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="top">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign4">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="middle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="middle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign5">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="bottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="bottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign6">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="texttop"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="texttop">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign7">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="absmiddle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="absmiddle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign8">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="absbottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="absbottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign9">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="any value"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="any value">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlign10">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" align="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" align="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAlt">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" alt="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAltKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="Testing 
Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAltKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="Testing 
Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAltKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="Message 
D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageAltKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="Message 
D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageBorder">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" border="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" border="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageHeight1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" height="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" height="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageHeight2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" height="155px"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" height="155px">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageHspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" hspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" hspace="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageImageName">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" imageName="nameOfImage"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" 
name="nameOfImage">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageImageIsmap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" ismap="nameOfMap"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" ismap="nameOfMap">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageLocale">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" locale="secret locale" 
altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" alt="Message 
D'Essai">
      </bean:define>
  </logic:equal>
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag1a.jsp
  
  Index: TestImgTag1a.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <logic:equal name="runTest" value="testImgPageNameNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramMapNoScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapNoScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNamePropertyNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramPropertyMapNoScope" 
property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapNoScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNameApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramMapApplicationScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapApplicationScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNamePropertyApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramPropertyMapApplicationScope" 
property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapApplicationScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNameSessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramMapSessionScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapSessionScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNamePropertySessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramPropertyMapSessionScope" 
property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapSessionScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNameRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramMapRequestScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapRequestScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageNamePropertyRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" name="paramPropertyMapRequestScope" 
property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapRequestScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/some/image.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag2.jsp
  
  Index: TestImgTag2.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <!-- --------Testing attributes using page------ -->
  <logic:equal name="runTest" value="testImgPageOnclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onclick="onclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onclick="onclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageOndblclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" ondblclick="ondblclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" 
ondblclick="ondblclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageOnkeydown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onkeydown="onkeydown"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" 
onkeydown="onkeydown">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageOnkeypress">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onkeypress="onkeypress"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" 
onkeypress="onkeypress">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageOnkeyup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onkeyup="onkeyup"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onkeyup="onkeyup">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageOnmousedown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onmousedown="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onmousedown="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageOnmousemove">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onmousemove="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onmousemove="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageOnmouseout">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onmouseout="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onmouseout="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageOnmouseover">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onmouseover="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onmouseover="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageOnmouseup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" onmouseup="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" onmouseup="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageStyle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" style="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" style="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageStyleClass">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" styleClass="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" class="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageStyleId">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" styleId="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" id="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageTitle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" title="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" title="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageTitleKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" title="Testing 
Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageTitleKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" titleKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" title="Testing 
Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageTitleKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" title="Message 
D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageTitleKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" titleKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" title="Message 
D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageUsemap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" usemap="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" usemap="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageVspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" vspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" vspace="15">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageWidth">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img page="/some/image.gif" width="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/some/image.gif")%>" width="15">
      </bean:define>
  </logic:equal>
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag3.jsp
  
  Index: TestImgTag3.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <!-- --------Testing attributes using page------ -->
  <logic:equal name="runTest" value="testImgPageKeyAlign1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="left"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" align="left">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="right"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="right">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign3">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="top"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" align="top">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign4">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="middle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="middle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign5">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="bottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="bottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign6">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="texttop"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="texttop">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign7">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="absmiddle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="absmiddle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign8">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="absbottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
align="absbottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign9">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="any value"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" align="any 
value">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlign10">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" align="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" align="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAlt">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" alt="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" alt="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAltKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" alt="Testing 
Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAltKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="alternate.testing.image" 
altKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/alternate/myimage.gif")%>" 
alt="Testing Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAltKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/images/fr/default/myimage.gif")%>" 
alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyAltKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="alternate.testing.image" 
altKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/images/fr/alternate/myimage.gif")%>" 
alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyBorder">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" border="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" border="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyHeight1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" height="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" height="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyHeight2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" height="155px"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
height="155px">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyHspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" hspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" hspace="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyImageName">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" imageName="nameOfImage"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
name="nameOfImage">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyImageIsmap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" ismap="nameOfMap"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
ismap="nameOfMap">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyLocale">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" locale="secret locale" 
altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/images/fr/default/myimage.gif")%>" 
alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag3a.jsp
  
  Index: TestImgTag3a.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <!-- --------Testing attributes using page------ -->
  <logic:equal name="runTest" value="testImgPageKeyNameNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" name="paramMapNoScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapNoScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNamePropertyNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" name="paramPropertyMapNoScope" 
property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapNoScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNameApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" name="paramMapApplicationScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapApplicationScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNamePropertyApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" 
name="paramPropertyMapApplicationScope" property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapApplicationScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNameSessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" name="paramMapSessionScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapSessionScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNamePropertySessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" 
name="paramPropertyMapSessionScope" property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapSessionScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNameRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" name="paramMapRequestScope"/>
     </bean:define>
     <bean:define id="thisMap1" name="paramMapRequestScope" type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyNamePropertyRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" 
name="paramPropertyMapRequestScope" property="map"/>
     </bean:define>
     <bean:define id="thisMap2" name="paramPropertyMapRequestScope" property="map" 
type="java.util.Map"/>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
                <img 
src="<%=org.apache.struts.util.RequestUtils.computeURL(pageContext, null, null, 
"/images/default/default/myimage.gif", null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag4.jsp
  
  Index: TestImgTag4.jsp
  ===================================================================
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <!-- --------Testing attributes using page------ -->
  <logic:equal name="runTest" value="testImgPageKeyOnclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onclick="onclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onclick="onclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyOndblclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" ondblclick="ondblclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
ondblclick="ondblclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyOnkeydown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onkeydown="onkeydown"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onkeydown="onkeydown">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyOnkeypress">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onkeypress="onkeypress"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onkeypress="onkeypress">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyOnkeyup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onkeyup="onkeyup"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onkeyup="onkeyup">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyOnmousedown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onmousedown="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onmousedown="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyOnmousemove">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onmousemove="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onmousemove="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyOnmouseout">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onmouseout="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onmouseout="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyOnmouseover">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onmouseover="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onmouseover="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyOnmouseup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" onmouseup="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
onmouseup="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyStyle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" style="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" style="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyStyleClass">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" styleClass="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" class="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyStyleId">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" styleId="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" id="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyTitle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" title="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" title="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyTitleKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" 
title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyTitleKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="alternate.testing.image" 
titleKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/alternate/myimage.gif")%>" 
title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyTitleKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/images/fr/default/myimage.gif")%>" 
title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyTitleKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="alternate.testing.image" 
titleKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="<%=response.encodeURL("/test/images/fr/alternate/myimage.gif")%>" 
title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyUsemap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" usemap="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" usemap="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgPageKeyVspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" vspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" vspace="15">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgPageKeyWidth">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img pageKey="default.testing.image" width="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img 
src="<%=response.encodeURL("/test/images/default/default/myimage.gif")%>" width="15">
      </bean:define>
  </logic:equal>
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
      throw new javax.servlet.jsp.JspException
        ("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
        expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
        compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to