DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
<!--
 Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

<project name="Webclient Unit Tests" default="run.test" basedir=".">

<!--
        This is a generic build.xml file for Ant that is used to run the
        Webclient unit tests. This build file *must* be called from the
        build.xml file in order to inherit most of it's needed properties
        (See below for the list of these properties).
-->

<!-- ========== Prerequisite Properties =================================== -->


<!--
        These properties MUST be set on the "ant" command line, the "antrc"
        properties file in your home directory, or from settings in a superior
        build.xml script.

        build.home                    Base directory into which we are building
                                      the Struts components.

        servlet.jar                   The servlet jar (either 2.2 or 2.3)

        cactus.jar                    The Cactus jar (either for Servlet API
                                      2.2 or 2.3)

        cactus.ant.jar                The Cactus custom Ant tasks jar

        httpclient.jar                The Cactus httpclient jar

        junit.jar                     The JUnit jar

        tomcat.home                   The home directory of where Tomcat 4.0
                                      is installed

        compile.debug                 The debug mode for compilation

        compile.deprecation           The deprecation mode for compilation

        compile.optimize              The optimization mode for compilation

        src.dir                       The location of the source directory

        app.name                      The name of the Struts jar (without the
                                      '.jar' suffix

-->

<!-- ========== Initialization Properties ================================= -->

<!-- ========== Derived Properties ======================================== -->

<!--
        These property values are derived from values defined above, and
        generally should NOT be overridden by command line settings
-->

    <!-- Default value for debugging arguments is no.  Override in
         build.properties -->
    <property name="debug.jvm.args" value=""/>

    <!-- Source directory for tests -->
    <property name="src.test.dir" value="${basedir}/test/automated/src/classes"/>
    <property name="src.manual.test.dir" value="${basedir}/test/manual/src/classes"/>
    <property name="src.mcp.test.dir" value="${basedir}/../dist/mcp-test/src/test/java"/>

    <!-- Output directory for tests -->
    <property name="out.test.dir" value="${build.home}/test"/>

    <!-- Output directory for test data files -->
    <property name="build.test" value="${basedir}/build.test"/>

    <property name="native.waitForDebugger" value=""/>

    <path id="test.classpath">
      <pathelement location="${junit.jar}"/>
      <pathelement location="${build.home}"/>
      <pathelement location="${out.test.dir}/classes"/>
    </path>

    <property name="test.browser.url" 
              value="http://developers.sun.com/ajax/" />


<!-- ========== Executable Targets ======================================== -->

<!-- 
        Compile unit tests
-->
    <target name="compile.test" depends="copy-test-data-files">

        <echo message="${build.home}"/>

        <mkdir  dir="${out.test.dir}/classes"/>

        <javac destdir="${out.test.dir}/classes"
            debug="${compile.debug}"
           source="${compile.source}"
            optimize="${compile.optimize}"
            deprecation="${compile.deprecation}">

              <classpath refid="test.classpath"/>

	      <src path="${src.test.dir}"/>
	      <src path="${src.manual.test.dir}"/>
	      <src path="${src.mcp.test.dir}"/>
	      <patternset>
		    <exclude name="**/*Win32*.java" if="build.unix.classes"/>
		    <exclude name="**/*Cocoa*.java" if="build.unix.classes"/>
	      </patternset>

	      <patternset>
		    <exclude name="**/*Gtk*.java" if="build.win32.classes"/>
		    <exclude name="**/*Cocoa*.java" if="build.win32.classes"/>
	      </patternset>

       	      <patternset>
		    <exclude name="**/*Gtk*.java" if="build.mac.classes"/>
		    <exclude name="**/*Win32*.java" if="build.mac.classes"/>
	      </patternset>

        </javac>
  
        <copy todir="${out.test.dir}/classes">
          <fileset dir="${src.test.dir}">
            <include name="**/*.properties" />
          </fileset>
        </copy>

    </target>

    <target name="copy-test-data-files">
        <!-- Copy Unit test static files. -->

        <mkdir  dir="${build.test}"/>

        <copy todir="${build.test}">
            <fileset dir="${basedir}/test/automated/src/test"/>
        </copy>

        <copy todir="${out.test.dir}/classes">
           <fileset dir="${src.manual.test.dir}">
            <include name="**/*.gif" />
            <include name="**/*.png" />
           </fileset>
        </copy>
   </target>


    <target name="clean">

      <delete dir="${out.test.dir}/classes"/>
      <delete dir="${build.test}"/>

    </target>

    <target name="run.test" depends="compile.test">

        <junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes">
            <jvmarg value="-DNSPR_LOG_MODULES=${myenv.NSPR_LOG_MODULES}"/>
            <jvmarg value="-DNSPR_LOG_FILE=${myenv.NSPR_LOG_FILE}"/>
            <jvmarg value="-DMOZ_SRC=${myenv.MOZ_SRC}"/>
            <jvmarg value="-DBROWSER_BIN_DIR=${myenv.MOZILLA_FIVE_HOME}"/>
            <jvmarg value="-Dbuild.test.results.dir=${build.test}"/>
            <sysproperty key="native.waitForDebugger" 
                         value="${native.waitForDebugger}"/>
            <jvmarg line="${debug.jvm.args}"/>
            <jvmarg line="-Djava.util.logging.config.file=${basedir}${FILE_PATH_SEP}..${FILE_PATH_SEP}logging.properties"/>

            <classpath refid="test.classpath"/>

            <formatter type="plain" usefile="false"/>
<!-- PENDING(edburns): 20060304 fix when ProfileManager is fixed
            <test name="org.mozilla.webclient.ProfileManagerTest"/>
PENDING(edburns): 20070130 XULRunner has no bookmarks
            <test name="org.mozilla.webclient.BookmarksTest"/>
-->
            <test name="org.mozilla.webclient.BrowserControlFactoryTest"/>
            <test name="org.mozilla.webclient.PreferencesTest"/>
            <test name="org.mozilla.webclient.impl.wrapper_native.WrapperFactoryImplTest"/>
            <test name="org.mozilla.webclient.impl.WebclientFactoryImplTest"/>
            <test name="org.mozilla.webclient.NavigationTest"/>
            <test name="org.mozilla.webclient.HistoryTest"/>
            <test name="org.mozilla.webclient.MouseListenerTest"/>
            <test name="org.mozilla.webclient.KeyListenerTest"/>
            <test name="org.mozilla.webclient.DocumentLoadListenerTest"/>
            <test name="org.mozilla.webclient.WindowCreatorTest"/>
            <test name="org.mozilla.webclient.DOMTest"/>
            <test name="org.mozilla.webclient.CurrentPageTest"/>
<!-- non running
            <test name="org.mozilla.webclient.wrapper_native.gtk.TestGtkBrowserControlCanvas"/>
-->

        </junit>

    </target>

    <target name="run.cardemo" depends="compile.test">

        <junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes">
            <jvmarg value="-DNSPR_LOG_MODULES=${myenv.NSPR_LOG_MODULES}"/>
            <jvmarg value="-DNSPR_LOG_FILE=${myenv.NSPR_LOG_FILE}"/>
            <jvmarg value="-DMOZ_SRC=${myenv.MOZ_SRC}"/>
            <jvmarg value="-DBROWSER_BIN_DIR=${myenv.MOZILLA_FIVE_HOME}"/>
            <sysproperty key="native.waitForDebugger" 
                         value="${native.waitForDebugger}"/>
            <jvmarg line="${debug.jvm.args}"/>
            <jvmarg line="-Djava.util.logging.config.file=${basedir}${FILE_PATH_SEP}..${FILE_PATH_SEP}logging.properties"/>

            <classpath refid="test.classpath"/>

            <formatter type="plain" usefile="false"/>
            <test name="org.mozilla.webclient.CarDemoTest"/>
        </junit>

    </target>


    <target name="run.test.browser" depends="compile.test">

        <java classname="org.mozilla.webclient.test.TestBrowser" fork="true">
            <jvmarg value="-DNSPR_LOG_MODULES=${myenv.NSPR_LOG_MODULES}"/>
            <jvmarg value="-DNSPR_LOG_FILE=${myenv.NSPR_LOG_FILE}"/>
            <jvmarg value="-DBROWSER_BIN_DIR=${myenv.MOZILLA_FIVE_HOME}"/>
            <sysproperty key="native.waitForDebugger" 
                         value="${native.waitForDebugger}"/>
            <jvmarg line="${debug.jvm.args}"/>
            <jvmarg line="-Djava.util.logging.config.file=${basedir}${FILE_PATH_SEP}..${FILE_PATH_SEP}logging.properties"/>

            <classpath refid="test.classpath"/>
            <arg value="${test.browser.url}" />
        </java>

    </target>

</project>