jmitchell    2003/03/11 16:34:24

  Added:       web/test/test/org/apache/struts/taglib/html TestImgTag5.jsp
                        TestImgTag5a.jsp TestImgTag6.jsp TestImgTag7.jsp
                        TestImgTag7a.jsp TestImgTag8.jsp
  Log:
  New tests
  
  Revision  Changes    Path
  1.1                  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag5.jsp
  
  Index: TestImgTag5.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 src ------ -->
  <logic:equal name="runTest" value="testImgSrcAlign1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="left"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="left">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="right"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="right">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign3">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="top"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="top">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign4">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="middle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="middle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign5">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="bottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="bottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign6">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="texttop"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="texttop">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign7">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="absmiddle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="absmiddle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign8">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="absbottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="absbottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign9">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="any value"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="any value">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlign10">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" align="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" align="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAlt">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" alt="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" alt="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAltKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" alt="Testing Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAltKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" alt="Testing Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAltKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcAltKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcBorder">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" border="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" border="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcHeight1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" height="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" height="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcHeight2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" height="155px"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" height="155px">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcHspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" hspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" hspace="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcImageName">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" imageName="nameOfImage"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" name="nameOfImage">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcImageIsmap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" ismap="nameOfMap"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" ismap="nameOfMap">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcLocale">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" locale="secret locale" 
altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/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/TestImgTag5a.jsp
  
  Index: TestImgTag5a.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 src ------ -->
  <logic:equal name="runTest" value="testImgSrcNameNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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,"/some/image.gif",  null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNamePropertyNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNameApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNamePropertyApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNameSessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNamePropertySessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNameRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcNamePropertyRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/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, 
"/some/image.gif", null, 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/TestImgTag6.jsp
  
  Index: TestImgTag6.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 src ------ -->
  <logic:equal name="runTest" value="testImgSrcOnclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onclick="onclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onclick="onclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcOndblclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" ondblclick="ondblclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" ondblclick="ondblclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcOnkeydown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onkeydown="onkeydown"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onkeydown="onkeydown">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcOnkeypress">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onkeypress="onkeypress"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onkeypress="onkeypress">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcOnkeyup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onkeyup="onkeyup"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onkeyup="onkeyup">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcOnmousedown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onmousedown="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onmousedown="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcOnmousemove">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onmousemove="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onmousemove="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcOnmouseout">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onmouseout="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onmouseout="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcOnmouseover">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onmouseover="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onmouseover="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcOnmouseup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" onmouseup="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" onmouseup="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcStyle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" style="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" style="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcStyleClass">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" styleClass="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" class="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcStyleId">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" styleId="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" id="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcTitle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" title="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" title="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcTitleKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcTitleKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" titleKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcTitleKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcTitleKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" titleKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcUsemap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" usemap="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" usemap="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcVspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" vspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/some/image.gif" vspace="15">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcWidth">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img src="/some/image.gif" width="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/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/TestImgTag7.jsp
  
  Index: TestImgTag7.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 srcKey ------ -->
  <logic:equal name="runTest" value="testImgSrcKeyAlign1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="left"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="left">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="right"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="right">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign3">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="top"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="top">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign4">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="middle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="middle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign5">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="bottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="bottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign6">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="texttop"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="texttop">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign7">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="absmiddle"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="absmiddle">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign8">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="absbottom"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="absbottom">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign9">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="any value"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="any value">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlign10">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" align="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" align="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAlt">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" alt="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" alt="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAltKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" alt="Testing Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAltKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="alternate.testing.image" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/alternate/myimage.gif" alt="Testing Message">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAltKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/fr/default/myimage.gif" alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyAltKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="alternate.testing.image" altKey="alternate.bundle.message" 
bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/fr/alternate/myimage.gif" alt="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyBorder">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" border="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" border="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyHeight1">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" height="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" height="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyHeight2">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" height="155px"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" height="155px">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyHspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" hspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" hspace="15">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyImageName">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" imageName="nameOfImage"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" name="nameOfImage">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyImageIsmap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" ismap="nameOfMap"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" ismap="nameOfMap">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyLocale">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" locale="secret locale" 
altKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/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/TestImgTag7a.jsp
  
  Index: TestImgTag7a.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 srcKey ------ -->
  <logic:equal name="runTest" value="testImgSrcKeyNameNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNamePropertyNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNameApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNamePropertyApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNameSessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNamePropertySessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap2, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNameRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, null, thisMap1, null, false)%>">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyNamePropertyRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="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, 
"/images/default/default/myimage.gif", null, 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/TestImgTag8.jsp
  
  Index: TestImgTag8.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 srcKey ------ -->
  <logic:equal name="runTest" value="testImgSrcKeyOnclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onclick="onclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onclick="onclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyOndblclick">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" ondblclick="ondblclick"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" ondblclick="ondblclick">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyOnkeydown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onkeydown="onkeydown"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onkeydown="onkeydown">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyOnkeypress">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onkeypress="onkeypress"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onkeypress="onkeypress">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyOnkeyup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onkeyup="onkeyup"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onkeyup="onkeyup">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyOnmousedown">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onmousedown="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onmousedown="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyOnmousemove">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onmousemove="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onmousemove="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyOnmouseout">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onmouseout="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onmouseout="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyOnmouseover">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onmouseover="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onmouseover="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyOnmouseup">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" onmouseup="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" onmouseup="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyStyle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" style="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" style="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyStyleClass">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" styleClass="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" class="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyStyleId">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" styleId="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" id="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyTitle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" title="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" title="XXX">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyTitleKeyDefaultBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyTitleKeyAlternateBundle">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="alternate.testing.image" 
titleKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/alternate/myimage.gif" title="Testing Message">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyTitleKeyDefaultBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" titleKey="default.bundle.message"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/fr/default/myimage.gif" title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyTitleKeyAlternateBundle_fr">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="alternate.testing.image" 
titleKey="alternate.bundle.message" bundle="alternate"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/fr/alternate/myimage.gif" title="Message D'Essai">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyUsemap">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" usemap="XXX"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" usemap="XXX">
      </bean:define>
  </logic:equal>
  
  <logic:equal name="runTest" value="testImgSrcKeyVspace">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" vspace="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/images/default/default/myimage.gif" vspace="15">
      </bean:define>
  </logic:equal>
  
  
  <logic:equal name="runTest" value="testImgSrcKeyWidth">
      <bean:define id="TEST_RESULTS" toScope="page">
          <html:img srcKey="default.testing.image" width="15"/>
      </bean:define>
      <bean:define id="EXPECTED_RESULTS" toScope="page">
          <img src="/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