gecko-dev/java/webclient/build-tests.xml

209 lines
7.3 KiB
XML
Raw Normal View History

2004-06-17 21:20:30 +00:00
<!--
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"/>
2004-06-17 21:20:30 +00:00
<!-- 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>
<!-- ========== Executable Targets ======================================== -->
<!--
Compile unit tests
-->
<target name="compile.test" depends="copy-test-data-files">
2004-06-17 21:20:30 +00:00
<echo message="${build.home}"/>
<mkdir dir="${out.test.dir}/classes"/>
<javac destdir="${out.test.dir}/classes"
debug="${compile.debug}"
This checkin gets webclient and sorta running with Firefox 1.5.0.1 Next step is to fix this: D:\Projects\mozilla\MOZILLA_NIH\FIREFOX_1_5_0_1\mozilla\java\webclient\build-tests.xml:152: Test org.mozilla.webclient.DocumentLoadListenerTest failed M build.properties.sample - Add hint for msdev arguments. M dom/build.xml M util/build.xml M webclient/build.xml - compile.source to 1.3 M dom/jni/Makefile.in M webclient/src_ie/Makefile.in M webclient/src_moz/Makefile.in M webclient/src_moz/gtk/Makefile.in M webclient/src_share/Makefile.in - +DEFINES += -DMOZILLA_INTERNAL_API M dom/jni/nativeDOMProxyListener.cpp M dom/src/nsJavaDOMImpl.cpp - remove cast to (void **) in AttachCurrentThread M dom/src/Makefile.in - depend on layout - +DEFINES += -DMOZILLA_INTERNAL_API M webclient/build-tests.xml - comment out ProfileManagerTest - compile with compile.source M webclient/src_moz/NativeBrowserControl.cpp - nsIFocusController,nsIChromeEventHandler,nsIDomWindowInternal no longer needs nsCOMPtr M webclient/src_moz/NativeEventThread.cpp - remove IID defs for webShell, sHistory. M webclient/src_moz/NavigationActionEvents.cpp - remove nsIPresContext include M webclient/src_moz/NavigationImpl.cpp -#include "nsIServiceManagerUtils.h" // PENDING(edburns): when moving - // past 1.7, this changes to - // nsServiceManagerUtils.h +#include "nsServiceManagerUtils.h" M webclient/src_moz/ProfileManagerImpl.cpp - This is currently totally broken. Next step is to fix it. M webclient/src_moz/WrapperFactoryImpl.cpp - comment out profileManager accesses M webclient/src_moz/ns_globals.h M webclient/src_moz/ns_util.h - take out nsIWebShell M webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java - comment out goldenFile assertion until ProfileManager works.
2006-03-05 03:53:26 +00:00
source="${compile.source}"
2004-06-17 21:20:30 +00:00
optimize="${compile.optimize}"
deprecation="${compile.deprecation}">
<classpath refid="test.classpath"/>
<src path="${src.test.dir}"/>
<src path="${src.manual.test.dir}"/>
2004-06-17 21:20:30 +00:00
<patternset>
<exclude name="**/*Win32*.java" if="build.unix.classes"/>
<exclude name="**/*Cocoa*.java" if="build.unix.classes"/>
2004-06-17 21:20:30 +00:00
</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"/>
2004-06-17 21:20:30 +00:00
</patternset>
</javac>
</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>
2004-06-17 21:20:30 +00:00
</target>
<target name="clean">
<delete dir="${out.test.dir}/classes"/>
<delete dir="${build.test}"/>
</target>
<target name="run.test" depends="compile.test">
2004-06-17 21:20:30 +00:00
<junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes">
<jvmarg value="-Djava.library.path=${myenv.MOZILLA_FIVE_HOME}${PATH_SEP}${myenv.MOZILLA_FIVE_HOME}/components"/>
<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}"/>
2004-06-17 21:20:30 +00:00
<jvmarg value="-DBROWSER_BIN_DIR=${myenv.MOZILLA_FIVE_HOME}"/>
<sysproperty key="native.waitForDebugger"
value="${native.waitForDebugger}"/>
<jvmarg line="${debug.jvm.args}"/>
<classpath refid="test.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.mozilla.webclient.BrowserControlFactoryTest"/>
This checkin gets webclient and sorta running with Firefox 1.5.0.1 Next step is to fix this: D:\Projects\mozilla\MOZILLA_NIH\FIREFOX_1_5_0_1\mozilla\java\webclient\build-tests.xml:152: Test org.mozilla.webclient.DocumentLoadListenerTest failed M build.properties.sample - Add hint for msdev arguments. M dom/build.xml M util/build.xml M webclient/build.xml - compile.source to 1.3 M dom/jni/Makefile.in M webclient/src_ie/Makefile.in M webclient/src_moz/Makefile.in M webclient/src_moz/gtk/Makefile.in M webclient/src_share/Makefile.in - +DEFINES += -DMOZILLA_INTERNAL_API M dom/jni/nativeDOMProxyListener.cpp M dom/src/nsJavaDOMImpl.cpp - remove cast to (void **) in AttachCurrentThread M dom/src/Makefile.in - depend on layout - +DEFINES += -DMOZILLA_INTERNAL_API M webclient/build-tests.xml - comment out ProfileManagerTest - compile with compile.source M webclient/src_moz/NativeBrowserControl.cpp - nsIFocusController,nsIChromeEventHandler,nsIDomWindowInternal no longer needs nsCOMPtr M webclient/src_moz/NativeEventThread.cpp - remove IID defs for webShell, sHistory. M webclient/src_moz/NavigationActionEvents.cpp - remove nsIPresContext include M webclient/src_moz/NavigationImpl.cpp -#include "nsIServiceManagerUtils.h" // PENDING(edburns): when moving - // past 1.7, this changes to - // nsServiceManagerUtils.h +#include "nsServiceManagerUtils.h" M webclient/src_moz/ProfileManagerImpl.cpp - This is currently totally broken. Next step is to fix it. M webclient/src_moz/WrapperFactoryImpl.cpp - comment out profileManager accesses M webclient/src_moz/ns_globals.h M webclient/src_moz/ns_util.h - take out nsIWebShell M webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java - comment out goldenFile assertion until ProfileManager works.
2006-03-05 03:53:26 +00:00
<!-- PENDING(edburns): 20060304 fix when ProfileManager is fixed
<test name="org.mozilla.webclient.ProfileManagerTest"/>
This checkin gets webclient and sorta running with Firefox 1.5.0.1 Next step is to fix this: D:\Projects\mozilla\MOZILLA_NIH\FIREFOX_1_5_0_1\mozilla\java\webclient\build-tests.xml:152: Test org.mozilla.webclient.DocumentLoadListenerTest failed M build.properties.sample - Add hint for msdev arguments. M dom/build.xml M util/build.xml M webclient/build.xml - compile.source to 1.3 M dom/jni/Makefile.in M webclient/src_ie/Makefile.in M webclient/src_moz/Makefile.in M webclient/src_moz/gtk/Makefile.in M webclient/src_share/Makefile.in - +DEFINES += -DMOZILLA_INTERNAL_API M dom/jni/nativeDOMProxyListener.cpp M dom/src/nsJavaDOMImpl.cpp - remove cast to (void **) in AttachCurrentThread M dom/src/Makefile.in - depend on layout - +DEFINES += -DMOZILLA_INTERNAL_API M webclient/build-tests.xml - comment out ProfileManagerTest - compile with compile.source M webclient/src_moz/NativeBrowserControl.cpp - nsIFocusController,nsIChromeEventHandler,nsIDomWindowInternal no longer needs nsCOMPtr M webclient/src_moz/NativeEventThread.cpp - remove IID defs for webShell, sHistory. M webclient/src_moz/NavigationActionEvents.cpp - remove nsIPresContext include M webclient/src_moz/NavigationImpl.cpp -#include "nsIServiceManagerUtils.h" // PENDING(edburns): when moving - // past 1.7, this changes to - // nsServiceManagerUtils.h +#include "nsServiceManagerUtils.h" M webclient/src_moz/ProfileManagerImpl.cpp - This is currently totally broken. Next step is to fix it. M webclient/src_moz/WrapperFactoryImpl.cpp - comment out profileManager accesses M webclient/src_moz/ns_globals.h M webclient/src_moz/ns_util.h - take out nsIWebShell M webclient/test/automated/src/classes/org/mozilla/webclient/BrowserControlFactoryTest.java - comment out goldenFile assertion until ProfileManager works.
2006-03-05 03:53:26 +00:00
-->
<test name="org.mozilla.webclient.BookmarksTest"/>
<test name="org.mozilla.webclient.PreferencesTest"/>
<test name="org.mozilla.webclient.impl.wrapper_native.WrapperFactoryImplTest"/>
<test name="org.mozilla.webclient.impl.WebclientFactoryImplTest"/>
2004-06-17 21:20:30 +00:00
<test name="org.mozilla.webclient.NavigationTest"/>
<test name="org.mozilla.webclient.HistoryTest"/>
<test name="org.mozilla.webclient.MouseListenerTest"/>
This checkin enables the KeyListener feature. A webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java A webclient/test/automated/src/test/KeyListenerTest1.html M webclient/build-tests.xml - add new testcase M webclient/classes_spec/org/mozilla/webclient/BrowserControlCanvas.java M webclient/classes_spec/org/mozilla/webclient/EventRegistration2.java - allow KeyListeners to be added and removed. M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java - Lazily create listener lists. - Change the contract of queueEvent() to discard null events silently. - Add createKeyEvent() method. M webclient/src_moz/EmbedEventListener.cpp - new mask names and values, DOMDOMKeyListener_maskNames, DOMKeyListener_maskValues. - flesh out Key*() events. - add addKeyEventDataToProperties. - use eventType to discern how to populate the properties, with either key or mouse data. M webclient/src_moz/EmbedEventListener.h - key event includes and support methods. M webclient/src_moz/EmbedProgress.cpp - honor new last argument to util_InitializeEventMaskValuesFromClass(). M webclient/src_share/jni_util.cpp M webclient/src_share/jni_util.h - new constants +jobject CHAR_CODE; +jobject KEY_CODE; +jstring KEY_LISTENER_CLASSNAME; +char *DOMKeyListener_maskNames[] = { M webclient/src_share/jni_util_export.cpp M webclient/src_share/jni_util_export.h - new last argument to util_InitializeEventMaskValuesFromClass(const char *className, char *maskNames[], - jlong maskValues[]) + jlong maskValuesLong[], + jint maskValuesInt[]) Used when the maskValues are ints, otherwise null.
2004-12-01 03:21:23 +00:00
<test name="org.mozilla.webclient.KeyListenerTest"/>
This checkin implements a response header listener feature. I have changed the usage contract of the DocumentLoadListener slightly. Prior to this checkin, calling getEventData() on the DocumentLoadEvent passed in to your eventDispatched() method returned the URI to which the event applies. Now the getEventData() returns a Map. You must look up the "URI" key to find the URI to which the event applies. If your listener is an instance of PageInfoListener, and your event mask is END_URL_LOAD_EVENT_MASK, your Map will have an additional entry under the key "headers". This entry is another Map representing the response headers. DocumentLoadListener: * <p>The <code>eventDispatched()</code> method is passed a {@link * DocumentLoadEvent} instance. The <code>type</code> property of the * event will be one of the types defined as a <code>public static final * int</code> in <code>DocumentLoadEvent</code>.</p> * * <p>The <code>eventData</code> property of the * <code>DocumentLoadEvent</code> instance will be a * <code>java.util.Map</code>. For all <code>EVENT_MASK</code> types in * <code>DocumentLoadEvent</code> the map will contain an entry under * the key "<code>URI</code>" without the quotes. This will be the * fully qualified URI for the event.</p> * * <p>For the <code>PROGRESS_URL_LOAD_EVENT_MASK</code> there will be an * entry in the map for the key "<code>message</code>". This will be * the progress message from the browser.</p> PageInfoListener: * <p>This {@link DocumentLoadListener} subclass adds the ability to get * detailed information on each event. </p> * * <p>The <code>eventDispatched()</code> method is passed the same thing * as in the {@link DocumentLoadListener}.</p> * * <p>The <code>eventData</code> property of the * <code>DocumentLoadEvent</code> instance will be a * <code>java.util.Map</code>. For the * <code>END_URL_LOAD_EVENT_MASK</code> type in * <code>DocumentLoadEvent</code> the map will contain an entry under * the key "<code>URI</code>" without the quotes. This will be the * fully qualified URI for the event. The map will also contain an * entry under the key "<code>headers</code>". This entry will be a * <code>Map</code> of all the response headers.</p> The next step will be to allow the same procedure to work to discover the request headers. Ed A classes_spec/org/mozilla/webclient/PageInfoListener.java - marker class for listenening for high fidelity page information. A src_moz/EventRegistrationImpl.cpp - add boolean property, capturePageInfo to turn on or off high fidelity page information collection. M build-tests.xml - add new test, DocumentLoadListenerTest M build.xml - added new JNI class, EventRegistrationImpl M classes_spec/org/mozilla/webclient/CurrentPage2.java M classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java - rollback previous API for headers discovery M classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java - pass thru the capturePageInfo property - add URIToStringMap, currently not working. M classes_spec/org/mozilla/webclient/test/EMWindow.java - call toString() on the eventData, don't cast it to a String. M src_moz/EmbedProgress.cpp M src_moz/EmbedProgress.h - leverage the nsIHttpHeaderVisitor interface to discover the response headers. - add boolean property capturePageInfo A src_moz/HttpHeaderVisitorImpl.cpp A src_moz/HttpHeaderVisitorImpl.h - copy the headers to a Properties object. M src_moz/Makefile.in - compile two new files: + EventRegistrationImpl.cpp \ + HttpHeaderVisitorImpl.cpp \ M src_moz/NativeBrowserControl.cpp M src_moz/NativeBrowserControl.h - pass the NativeWrapperFactory to our Init() method - add wrapperFactory getter. M src_moz/WrapperFactoryImpl.cpp - pass the nativeWrapperFactory to the NativeBrowserControl's Init method. M src_share/jni_util.cpp M src_share/jni_util.h - new constants: URI, headers R test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java - not yet time for this one A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java - exercise bare minimum functionality of PageInfoListener M test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java - print out headers.
2004-09-09 20:17:18 +00:00
<test name="org.mozilla.webclient.DocumentLoadListenerTest"/>
<test name="org.mozilla.webclient.WindowCreatorTest"/>
<test name="org.mozilla.webclient.DOMTest"/>
<test name="org.mozilla.webclient.CurrentPageTest"/>
This checkin has the basic functionality of NewWindowListener re-implemented using the new event model. It's a bit cleaner. Next step is to uncomment the selection check at the end of WindowCreatorTest.java. This code currently causes the VM to crash. I also plan to do some testing on the chrome flags. M classes_spec/org/mozilla/webclient/EventRegistration2.java - deprecate {add,remove}NewWindowListener(), replace with setNewWindowListener(). M classes_spec/org/mozilla/webclient/NewWindowEvent.java - added BrowserControl property, which the user sets into the event. M classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java - change newWindowListeners List ivar to newWindowListener ivar. - fix {add,remove}NewWindowListener() to leverage setNewWindowListener() - change nativeEventOccurred() to return an int instead of void. - add boolean property nativeSetNewWindowListenerAttached() M classes_spec/org/mozilla/webclient/impl/wrapper_native/NativeEventThread.java - modify pushBlockingWCRunnable() to execute the runnable right away if we're already on the NativeEventThread. This is necessary to allow re-entrancy. M src_moz/EmbedEventListener.cpp M src_moz/EmbedEventListener.h - expose the mEventRegistration ivar via a getter. M src_moz/EventRegistrationImpl.cpp M src_moz/NativeBrowserControl.cpp M src_moz/NativeBrowserControl.h - add nativeSetNewWindowListenerAttached(), which calls through and sets it on the NativeBrowserControl. M src_moz/WindowCreator.cpp - implement CreateChromeWindow2, which is called when the browser needs a new window. M src_share/jni_util.cpp M src_share/jni_util.h - change util_SendEventToJava() to return int. M test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java
2005-01-18 15:20:52 +00:00
<!-- non running
2004-06-17 21:20:30 +00:00
<test name="org.mozilla.webclient.wrapper_native.gtk.TestGtkBrowserControlCanvas"/>
-->
</junit>
</target>
<target name="run.test.browser" depends="compile.test">
<java classname="org.mozilla.webclient.test.TestBrowser" fork="true">
<jvmarg value="-Djava.library.path=${myenv.MOZILLA_FIVE_HOME}${PATH_SEP}${myenv.MOZILLA_FIVE_HOME}/components"/>
<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}"/>
<classpath refid="test.classpath"/>
</java>
</target>
2004-06-17 21:20:30 +00:00
</project>