Merged branch JAVADEV_PR3_20001002 into trunk.
git-svn-id: svn://10.0.0.236/trunk@82247 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -25,6 +25,9 @@ srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
# PENDING(edburns): make it so it's possible to just build
|
||||
# webclient and javadom
|
||||
|
||||
DIRS= util \
|
||||
dom \
|
||||
plugins \
|
||||
@@ -32,3 +35,4 @@ DIRS= util \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..
|
||||
|
||||
DIRS = util \
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
webclient
|
||||
|
||||
|
||||
104
mozilla/java/README.commercial
Normal file
104
mozilla/java/README.commercial
Normal file
@@ -0,0 +1,104 @@
|
||||
******************** BLACKWOOD RELEASE 0.9 README ********************
|
||||
|
||||
|
||||
READ THIS DOCUMENT BEFORE RUNNING ANY OF THE BLACKWOOD COMPONENTS
|
||||
|
||||
|
||||
This version of Blackwood has been built on and configured for
|
||||
the Solaris(TM) operating environment
|
||||
|
||||
|
||||
This package contains the following components of the Blackwood Project
|
||||
- Pluglets, JavaDOM and Webclient
|
||||
|
||||
The Blackwood project aims to -
|
||||
1. Better integrate the Java (TM) platform with the Mozilla (Netscape 6)
|
||||
Browser so developers can extend the browser with components and
|
||||
plug-ins written in the Java programming language
|
||||
2. Make sure that Mozilla's layout engine can be embedded in
|
||||
applications running on a Java virtual machine (JVM).
|
||||
|
||||
More information on the Blackwood project can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
SYSTEM REQUIREMENTS
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The Blackwood software components run on Solaris for SPARC(TM) and
|
||||
Solaris for Intel with Solaris versions 7 and 8.
|
||||
|
||||
You will also need to install the JRE1.3.0_01 Java Bundle that goes
|
||||
with Netscape 6 PR3
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
BLACKWOOD COMPONENTS
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
JAVA PLUGLET API - A Pluglet is a plug-in that is written in the Java
|
||||
programming Language. The Java Pluglet API is a close 1:1 implementation
|
||||
of the new C++ Plug-in API in Mozilla and it allows users to develop
|
||||
plug-ins in Java that run inside a Java Virtual Machione (JVM).
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/java-plugins/
|
||||
|
||||
|
||||
JAVA DOM API - The Java DOM API is an implementation of the Java Bindings
|
||||
specified in the Document Object Model (DOM) Level 1 Specification. This
|
||||
API allows Java Applets and Pluglets to interact with and modify the
|
||||
document they are embedded into.
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/dom/
|
||||
http://www.w3.org/TR/REC-DOM-Level-1/java-language-binding.html
|
||||
|
||||
|
||||
WEBCLIENT - Webclient is a browser-neutral Java API that enables generic
|
||||
web browsing capabilities in a Java application.
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/webclient/
|
||||
http://www.mozilla.org/projects/blackwood/webclient/ref_guides/Developer_guide/index.htm
|
||||
http://www.mozilla.org/projects/blackwood/webclient/ref_guides/Implementation_guide/index.htm
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
RUN INSTRUCTIONS
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
PLUGLETS
|
||||
- Launch the browser using the shell script "netscape"
|
||||
- Navigate to the url file:///opt/SUNWns6/res/javadev/pluglets/test.html
|
||||
|
||||
This contains several Pluglet examples.
|
||||
|
||||
|
||||
JAVADOM
|
||||
- The DOMViewer example in the Pluglets example list is a JavaDOM example
|
||||
|
||||
|
||||
WEBCLIENT
|
||||
- set the Environment variable MOZILLA_FIVE_HOME to the location of your
|
||||
Netscape 6 binaries. If you install the SVR4 package, this will be
|
||||
setenv MOZILLA_FIVE_HOME /opt/SUNWns6
|
||||
- cd to the javadev/example directory
|
||||
- run the shell script runem as
|
||||
runem <your url>
|
||||
|
||||
|
||||
============================================================================
|
||||
Copyright 2000 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto,
|
||||
California 94303 U.S.A. All rights reserved.
|
||||
|
||||
Sun, Sun Microsystems, Java, SunOS, OpenWindows, and Solaris are trademarks,
|
||||
registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S.A.
|
||||
and other countries. All SPARC trademarks are used under license and are
|
||||
trademarks or registered trademarks of SPARC International, Inc. in the U.S.A.
|
||||
and other countries. Products bearing SPARC trademarks are based upon an
|
||||
architecture developed by Sun Microsystems, Inc. Netscape is a trademark of
|
||||
Netscape Communications Corporation. PostScript is a trademark of Adobe
|
||||
Systems, Incorporated, which may be registered in certain jurisdictions.
|
||||
|
||||
@@ -25,6 +25,6 @@ srcdir = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = src jni classes
|
||||
DIRS = classes jni src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -19,6 +19,63 @@
|
||||
Contributor(s):
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
* W3C® IPR SOFTWARE NOTICE
|
||||
|
||||
* Copyright © 1994-2000 World Wide Web Consortium, (Massachusetts
|
||||
* Institute of Technology, Institut National de Recherche en
|
||||
* Informatique et en Automatique, Keio University). All Rights
|
||||
* Reserved. http://www.w3.org/Consortium/Legal/
|
||||
|
||||
* This W3C work (including software, documents, or other related items) is
|
||||
* being provided by the copyright holders under the following
|
||||
* license. By obtaining, using and/or copying this work, you (the
|
||||
* licensee) agree that you have read, understood, and will comply with
|
||||
* the following terms and conditions:
|
||||
|
||||
* Permission to use, copy, and modify this software and its documentation,
|
||||
* with or without modification, for any purpose and without fee or
|
||||
* royalty is hereby granted, provided that you include the following on
|
||||
* ALL copies of the software and documentation or portions thereof,
|
||||
* including modifications, that you make:
|
||||
|
||||
* The full text of this NOTICE in a location viewable to users of the
|
||||
* redistributed or derivative work.
|
||||
|
||||
* Any pre-existing intellectual property disclaimers, notices, or terms
|
||||
* and conditions. If none exist, a short notice of the following form
|
||||
* (hypertext is preferred, text is permitted) should be used within the
|
||||
* body of any redistributed or derivative code: "Copyright ©
|
||||
* [$date-of-software] World Wide Web Consortium, (Massachusetts
|
||||
* Institute of Technology, Institut National de Recherche en
|
||||
* Informatique et en Automatique, Keio University). All Rights
|
||||
* Reserved. http://www.w3.org/Consortium/Legal/"
|
||||
|
||||
* Notice of any changes or modifications to the W3C files, including
|
||||
* the date changes were made. (We recommend you provide URIs to the
|
||||
* location from which the code is derived.)
|
||||
|
||||
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
|
||||
* HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR
|
||||
* FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
|
||||
* DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
|
||||
* TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
|
||||
* SOFTWARE OR DOCUMENTATION.
|
||||
|
||||
* The name and trademarks of copyright holders may NOT be used in
|
||||
* advertising or publicity pertaining to the software without specific,
|
||||
* written prior permission. Title to copyright in this software and any
|
||||
* associated documentation will at all times remain with copyright
|
||||
* holders.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -29,7 +29,7 @@ LIBRARY_NAME = javadom
|
||||
IS_COMPONENT = 1
|
||||
|
||||
CPPSRCS = \
|
||||
nsJavaDOMImpl.cpp
|
||||
nsJavaDOMImpl.cpp
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
|
||||
@@ -57,8 +57,15 @@ org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_4
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_4
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createAttributeNS_String_String_0
|
||||
@@ -76,6 +83,7 @@ org.mozilla.dom.test.DocumentImpl_createElement_createElementNS_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_createElementNS_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getDoctype
|
||||
@@ -88,6 +96,7 @@ org.mozilla.dom.test.DocumentImpl_getElementsByTagNameNS_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagNameNS_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_getImplementation
|
||||
org.mozilla.dom.test.DocumentImpl_importNode_Node_boolean_0
|
||||
org.mozilla.dom.test.DocumentImpl_importNode_Node_boolean_1
|
||||
|
||||
@@ -3,8 +3,15 @@ org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_4
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocumentType_String_String_String_4
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_createDocument_String_String_DocumentType_4
|
||||
org.mozilla.dom.test.DocumentImpl_createAttributeNS_String_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createAttributeNS_String_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createAttributeNS_String_String_2
|
||||
@@ -19,6 +26,7 @@ org.mozilla.dom.test.DocumentImpl_createElement_createElementNS_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_createElementNS_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createEvent_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_0
|
||||
@@ -37,6 +45,7 @@ org.mozilla.dom.test.DocumentImpl_getElementsByTagNameNS_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagNameNS_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getElementById_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_getImplementation
|
||||
org.mozilla.dom.test.DocumentImpl_importNode_Node_boolean_0
|
||||
org.mozilla.dom.test.DocumentImpl_importNode_Node_boolean_1
|
||||
@@ -55,3 +64,49 @@ org.mozilla.dom.test.ProcessingInstructionImpl_setData_String_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_0
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_2
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNS_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNS_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNS_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNS_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNodeNS_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNodeNS_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNodeNS_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNodeNS_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagNameNS_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagNameNS_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagNameNS_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagNameNS_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_hasAttributeNS_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_hasAttributeNS_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_hasAttributeNS_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_hasAttributeNS_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_hasAttribute_String_0
|
||||
org.mozilla.dom.test.ElementImpl_hasAttribute_String_1
|
||||
org.mozilla.dom.test.ElementImpl_hasAttribute_String_2
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNS_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNS_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNS_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNS_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_3
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_4
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_5
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_6
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_7
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_8
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNS_String_String_String_9
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNodeNS_Attr_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNodeNS_Attr_1
|
||||
org.mozilla.dom.test.NodeImpl_getLocalName
|
||||
org.mozilla.dom.test.NodeImpl_getNamespaceURI
|
||||
org.mozilla.dom.test.NodeImpl_getPrefix_0
|
||||
org.mozilla.dom.test.NodeImpl_getPrefix_1
|
||||
org.mozilla.dom.test.NodeImpl_setPrefix_String_0
|
||||
org.mozilla.dom.test.NodeImpl_setPrefix_String_1
|
||||
org.mozilla.dom.test.NodeImpl_supports_String_String_0
|
||||
org.mozilla.dom.test.NodeImpl_supports_String_String_1
|
||||
org.mozilla.dom.test.NodeImpl_supports_String_String_2
|
||||
org.mozilla.dom.test.NodeImpl_supports_String_String_3
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ all:
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
mkdir -p $(CLASSDIR)
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
cd $(CLASSDIR); jar cvf testdom.jar org
|
||||
cd newsrc; make
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
|
||||
HOMEDIR=../
|
||||
SRCDIR=$(HOMEDIR)/src
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
@@ -33,10 +32,10 @@ all:
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
mkdir -p $(CLASSDIR)
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
cd $(CLASSDIR); jar cvf testdom.jar org
|
||||
cd newsrc; make
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
|
||||
@@ -44,10 +44,12 @@ JAVAFILES= Execution.java \
|
||||
DOMFILE=DOMAccessor.java \
|
||||
DocumentImpl.java
|
||||
|
||||
all: testloader accessor
|
||||
all: testloader
|
||||
@echo done
|
||||
@cd api
|
||||
@nmake -f Makefile.win
|
||||
@cd ..\newsrc
|
||||
@nmake -f Makefile.win
|
||||
|
||||
testloader:
|
||||
@echo "******************************************************"
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
This document describes steps required to run the Test Suite for JavaDOM API.
|
||||
This document describes steps required to run the Test Suite for JavaDOM API
|
||||
throught a PLUGLET.
|
||||
You have to build PLUGLETS before building this
|
||||
( see http://www.mozilla.org/projects/blackwood/java-plugins )
|
||||
|
||||
For Solaris
|
||||
===========
|
||||
@@ -7,12 +10,11 @@ For Solaris
|
||||
2) make changes to variables
|
||||
MOZILLA_FIVE_HOME - Absolute path where mozilla-bin
|
||||
executable is located.
|
||||
JAVA_HOME - Absolute Path to JDK dir.
|
||||
JAVA_HOME - Absolute Path to J2SE1.3 dir.
|
||||
TEST_PATH - Absolute Directory Path where file
|
||||
BWTestClass.lst is located.
|
||||
USE_APPLET_FOR_REGISTRATION - set this variable if you wish to use
|
||||
applet for running tests Otherwise
|
||||
hacked DOMAccessor class is used.
|
||||
PLUGLET - Absolute dir. where DOMPLUGLET.jar
|
||||
is located
|
||||
|
||||
3) source mozilla.csh
|
||||
this will set up the environment
|
||||
@@ -24,21 +26,17 @@ For Solaris
|
||||
created)
|
||||
BW_THREADMODE (Execute tests in single thread [S] or
|
||||
multi-thread [M] mode. Takes values S/M.)
|
||||
BW_HTMLTEST (URL where redirect.html file are located. Used if you
|
||||
run tests through TestLoader applet)
|
||||
BW_XMLTEST (URL where test.xml file are located. Used if you run
|
||||
tests through TestLoader applet)
|
||||
|
||||
5) Copy redirect.html, redirectxml.html, test.html and test.xml files to your Web-Servers DOCUMENT_ROOT
|
||||
(By default it is assumed that they can be accessed as
|
||||
http://<server name>/redirect.html).
|
||||
or
|
||||
http://<server name>/~<username>/redirect.html).
|
||||
5) Set PLUGLET enviornment to point to classes dir.
|
||||
setenv PLUGLET /opt/mozilla/java/dom/tests/classes
|
||||
|
||||
6) Invoke autorun.sh from command prompt.
|
||||
6) Set LD_PRELOAD to point to libXm.so
|
||||
setenv LD_PRELOAD libXm.so
|
||||
|
||||
7) Invoke autorun.sh from command prompt.
|
||||
sh autorun.sh
|
||||
|
||||
7) The results are recorded in HTML file BWTest.html
|
||||
8) The results are recorded in HTML file BWTest.html
|
||||
and in log file BWTest.log
|
||||
Individual test Log files are also found in 'log' directory.
|
||||
|
||||
@@ -48,18 +46,10 @@ For Solaris
|
||||
To Invoke a specific test case
|
||||
sh autorun.sh -t org.mozilla.dom.test.AttrImpl_getName
|
||||
|
||||
NOTE: All Test Cases are reocorded in file BWTestClass.lst.ORIG
|
||||
|
||||
Assumption:
|
||||
|
||||
I assume that u have copied the files test.xml
|
||||
and redirect.html, redirectxml.html, test.html to your DOCUMENT_ROOT of
|
||||
your WebServer.
|
||||
The URL it tries to load is http://<servername>/redirect.html.
|
||||
|
||||
If it is set in users public_html then open file autorun.sh
|
||||
and change DOCROOT accordingly.
|
||||
|
||||
NOTE: All TestCase list is recorded in file BWTestClass.lst.ORIG
|
||||
If your machine is slow and loading time of mozilla is high then
|
||||
accordingly increase DELAY_FACTOR to a higher value in autorun.sh.
|
||||
|
||||
|
||||
|
||||
=============================================================================
|
||||
@@ -73,19 +63,12 @@ Assumes you have installed PERL and the following variables are set in your envi
|
||||
1) open mozilla.bat
|
||||
|
||||
2) make changes to variables
|
||||
USE_APPLET_FOR_REGISTRATION - set this variable if you wish to use
|
||||
applet for running tests
|
||||
(now available under Win32 only).
|
||||
Otherwise hacked DOMAccessor class
|
||||
is used.
|
||||
MOZILLA_BIN - Mozilla's executable file name
|
||||
(e.g. mozilla.exe or viewer.exe)
|
||||
TEST_PATH - path to the current directory
|
||||
(where mozilla.bat is)
|
||||
TEST_URL - URL where redirect.html and test.html
|
||||
are located (complete URL looks like:
|
||||
$TEST_URL/redirect.html).Used if you
|
||||
run tests through hacked DOMAccessor only
|
||||
PLUGLET - Absolute dir. where DOMPLUGLET.jar
|
||||
is located
|
||||
|
||||
3) execute mozilla.bat from command prompt
|
||||
this will create new console and set up the environment for this
|
||||
@@ -99,10 +82,6 @@ Assumes you have installed PERL and the following variables are set in your envi
|
||||
BW_THREADMODE (Execute tests in single thread [S] or
|
||||
multi-thread [M] mode. Takes values S/M.)
|
||||
|
||||
BW_HTMLTEST (URL where redirect.html file is located. Used if you
|
||||
run tests through TestLoader applet)
|
||||
BW_XMLTEST (URL where test.xml file is located. Used if you
|
||||
run tests through TestLoader applet)
|
||||
|
||||
NOTE: Since on Windows file separator is a `\`, it should be escaped
|
||||
by another '\'. So if a file is in c:\mozilla\tests then it
|
||||
@@ -111,15 +90,8 @@ Assumes you have installed PERL and the following variables are set in your envi
|
||||
|
||||
5) Invoke autorun.pl from command prompt.
|
||||
perl autorun.pl
|
||||
For quick testing say
|
||||
if you use applet for registration
|
||||
mozilla.exe file:/TestLoaderHTML.html
|
||||
(mozilla.exe file:/TestLoaderXML.html)
|
||||
|
||||
if you use hacked DOMAcceessor.
|
||||
mozilla.exe file:/redirect.html
|
||||
|
||||
7) The results are recorded in HTML file BWTest.html
|
||||
6) The results are recorded in HTML file BWTest.html
|
||||
and in log file BWTest.log
|
||||
Individual test Log files are also found in 'log' directory.
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use Win32::Process;
|
||||
###################################################################
|
||||
|
||||
#sometimes we need to specify additional parameters for mozilla
|
||||
$ADDITIONAL_PARAMETERS="-P mozProfile";
|
||||
$ADDITIONAL_PARAMETERS="-P default";
|
||||
|
||||
# time in seconds after which the mozilla has to be killed.
|
||||
# by default the mozilla will be up for so much time regardless of
|
||||
@@ -85,8 +85,8 @@ sub title() {
|
||||
print " Automated Execution of DOM API TestSuite\n";
|
||||
print "################################################\n";
|
||||
print "\n";
|
||||
print "NOTE: You need to copy files redirect.html, test.html and test.xml,\n";
|
||||
print " redirectxml.html into some document directory of HTTP server\n";
|
||||
print "NOTE: You need to copy files test.html and test.xml,\n";
|
||||
print " into some document directory of HTTP server\n";
|
||||
print " TEST_URL environment variable should contain the URL of \n";
|
||||
print " this directory.\n";
|
||||
print "\n";
|
||||
@@ -270,6 +270,7 @@ $LOGFILE = "$curdir/log/BWTestRun.log";
|
||||
$LOGTXT = "$curdir/log/BWTest.txt";
|
||||
$LOGHTML = "$curdir/log/BWTest.html";
|
||||
|
||||
$x=`mkdir -p $curdir/log`;
|
||||
# process command-line parameters
|
||||
# and check for valid usage
|
||||
|
||||
@@ -361,7 +362,7 @@ if ( -f "$LOGHTML" ) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
$DOCFILE = "$DOCROOT/test.html";
|
||||
}
|
||||
$runcnt = 1;
|
||||
$filename = "$curdir/BWTestClass.lst.ORIG";
|
||||
@@ -370,7 +371,7 @@ if ($runtype == 1) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
$DOCFILE = "$DOCROOT/test.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.html.ORIG";
|
||||
$runcnt = 1;
|
||||
@@ -380,7 +381,7 @@ if ($runtype == 2) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderXML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirectxml.html";
|
||||
$DOCFILE = "$DOCROOT/testxml.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.xml.ORIG";
|
||||
$runcnt = 1;
|
||||
@@ -390,7 +391,7 @@ if ($runtype == 3) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
$DOCFILE = "$DOCROOT/test.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.html.ORIG";
|
||||
$runcnt = 2;
|
||||
@@ -492,7 +493,7 @@ while (true) {
|
||||
( ++$currcnt < $runcnt ) || last;
|
||||
|
||||
if ( $runtype == 3 ) {
|
||||
$DOCFILE="$DOCROOT/redirectxml.html";
|
||||
$DOCFILE="$DOCROOT/testxml.html";
|
||||
$filename="$curdir/BWTestClass.lst.xml.ORIG";
|
||||
constructHTML;
|
||||
appendEntries;
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
DELAY_FACTOR=50
|
||||
SERVER=`hostname`
|
||||
USER=`logname`
|
||||
DOCROOT="http://$SERVER/~$USER"
|
||||
#DOCROOT="http://$SERVER/~$USER"
|
||||
curdir=`pwd`
|
||||
DOCROOT="file://$curdir"
|
||||
ADDITIONAL_PARAMETERS="-P default"
|
||||
|
||||
|
||||
|
||||
@@ -64,8 +67,8 @@ title()
|
||||
echo " Automated Execution of DOM API TestSuite"
|
||||
echo "################################################"
|
||||
echo
|
||||
echo "NOTE: You need to copy files redirect.html, test.html and"
|
||||
echo " redirectxml.html, test.xml to DOCUMENT_ROOT dir. of"
|
||||
echo "NOTE: You need to copy files test.html and"
|
||||
echo " testxml.html to DOCUMENT_ROOT dir. of"
|
||||
echo " your Web-Server on this machine."
|
||||
echo
|
||||
echo
|
||||
@@ -135,14 +138,14 @@ checkRun()
|
||||
|
||||
##################################################################
|
||||
#
|
||||
# check Document Root and check if files test.html and test.xml
|
||||
# check Document Root and check if files test.html and testxml.html
|
||||
# exists in thos directories
|
||||
#
|
||||
##################################################################
|
||||
#checkDocRoot()
|
||||
#{
|
||||
# echo
|
||||
#echo "You need to copy files test.html and test.xml to your DOCUMENT_ROOT"
|
||||
#echo "You need to copy files test.html and testxml.html to your DOCUMENT_ROOT"
|
||||
#echo "of your Web-Server"
|
||||
#echo
|
||||
#echo "This test assumes that you have set up you WebServer and copied the"
|
||||
@@ -169,8 +172,8 @@ checkRun()
|
||||
#
|
||||
#
|
||||
#echo
|
||||
#echo "Checking if the files test.html and test.xml exists in DOCUMENT_ROOT..."
|
||||
#if [ ! -f "$docroot/test.html" ]
|
||||
#echo "Checking if the files test.html and testxml.html exists in DOCUMENT_ROOT..."
|
||||
#if [ ! -f "$docroot/test.html"
|
||||
#then
|
||||
# echo "Could not find 'test.html' in DOCUMENT_ROOT directory"
|
||||
# echo "Please copy test.html to DOCUMENT_ROOT and rerun this script"
|
||||
@@ -178,10 +181,10 @@ checkRun()
|
||||
# exit 1
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f "$docroot/test.xml" ]
|
||||
#if [ ! -f "$docroot/testxml.html" ]
|
||||
#then
|
||||
# echo "Could not find 'test.xml' in DOCUMENT_ROOT directory"
|
||||
# echo "Please copy test.xml to DOCUMENT_ROOT and rerun this script"
|
||||
# echo "Could not find 'testxml.html' in DOCUMENT_ROOT directory"
|
||||
# echo "Please copy testxml.html to DOCUMENT_ROOT and rerun this script"
|
||||
# echo
|
||||
# exit 1
|
||||
#fi
|
||||
@@ -308,7 +311,7 @@ constructLogFooter()
|
||||
|
||||
##################################################################
|
||||
#
|
||||
# check Document Root and check if files test.html and test.xml
|
||||
# check Document Root and check if files test.html and testxml.html
|
||||
# exists in thos directories
|
||||
#
|
||||
##################################################################
|
||||
@@ -334,10 +337,12 @@ clear
|
||||
title
|
||||
|
||||
curdir=`pwd`
|
||||
LOGDIRECTORY="$curdir/log";
|
||||
LOGFILE="$curdir/log/BWTestRun.log"
|
||||
LOGTXT="$curdir/log/BWTest.txt"
|
||||
LOGHTML="$curdir/log/BWTest.html"
|
||||
|
||||
/bin/mkdir -p "$LOGDIRECTORY";
|
||||
|
||||
testparam="";
|
||||
if [ $# -gt 2 ]
|
||||
@@ -465,7 +470,7 @@ fi
|
||||
appreg=${USE_APPLET_FOR_REGISTRATION}
|
||||
if [ -z "$appreg" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirect.html";
|
||||
DOCFILE="$DOCROOT/test.html";
|
||||
else
|
||||
DOCFILE="$DOCROOT/TestLoaderHTML.html";
|
||||
fi
|
||||
@@ -477,7 +482,7 @@ if [ "$runtype" = "1" ]
|
||||
then
|
||||
if [ -z "$appreg" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirect.html";
|
||||
DOCFILE="$DOCROOT/test.html";
|
||||
else
|
||||
DOCFILE="$DOCROOT/TestLoaderHTML.html";
|
||||
fi
|
||||
@@ -487,10 +492,10 @@ fi
|
||||
|
||||
if [ "$runtype" = "2" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirectxml.html"
|
||||
DOCFILE="$DOCROOT/testxml.html"
|
||||
if [ -z "$appreg" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirectxml.html";
|
||||
DOCFILE="$DOCROOT/testxml.html";
|
||||
else
|
||||
DOCFILE="$DOCROOT/TestLoaderXML.html";
|
||||
fi
|
||||
@@ -502,7 +507,7 @@ if [ "$runtype" = "3" ]
|
||||
then
|
||||
if [ -z "$appreg" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirect.html";
|
||||
DOCFILE="$DOCROOT/test.html";
|
||||
else
|
||||
DOCFILE="$DOCROOT/TestLoaderHTML.html";
|
||||
fi
|
||||
@@ -560,7 +565,7 @@ do
|
||||
format=`echo $testcase | sed 's/\./\//g'`
|
||||
nom=`basename $format`
|
||||
testlog="$curdir/log/$nom.$id.log"
|
||||
./mozilla-bin -P mozProfile $DOCFILE 2>$testlog 1>&2 &
|
||||
./mozilla-bin $ADDITIONAL_PARAMETERS $DOCFILE 2>$testlog 1>&2 &
|
||||
|
||||
# dummy sleep to allow mozilla-bin to show up on process table
|
||||
sleep 3
|
||||
@@ -636,7 +641,7 @@ do
|
||||
|
||||
if [ "$runtype" = "3" ]
|
||||
then
|
||||
DOCFILE="$DOCROOT/redirectxml.html"
|
||||
DOCFILE="$DOCROOT/testxml.html"
|
||||
filename="$curdir/BWTestClass.lst.xml.ORIG"
|
||||
constructHTML
|
||||
appendEntries
|
||||
|
||||
@@ -29,8 +29,10 @@ set TEST_URL=file:
|
||||
set PATH=%JAVA_HOME%\bin;%PATH%
|
||||
set PATH=%MOZILLA_FIVE_HOME%;%PATH%
|
||||
|
||||
set CLASSPATH=%TEST_PATH%\..\classes;%JAVADOM_HOME%\classes;%MOZILLA_FIVE_HOME%\..\classes;%CLASSPATH%
|
||||
set CLASSPATH=%TEST_PATH%\..\classes;%JAVADOM_HOME%\tests\classes;%MOZILLA_FIVE_HOME%\..\classes;%CLASSPATH%
|
||||
|
||||
set PLUGLET=%JAVADOM_HOME%\..\tests\classes
|
||||
|
||||
rem creating new console window with these variables being set
|
||||
start
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
setenv TEST_PATH `pwd`/..
|
||||
setenv MOZILLA_FIVE_HOME `pwd`/../../../../dist/bin
|
||||
setenv JAVADOM_HOME `pwd`/../../
|
||||
setenv JAVA_HOME /usr/local/java/jdk1.2/solaris
|
||||
setenv PREFIX /workspace
|
||||
setenv TEST_PATH `pwd`/../..
|
||||
setenv MOZILLA_FIVE_HOME `pwd`/../../../../../dist/bin
|
||||
setenv JAVADOM_HOME `pwd`/../../../
|
||||
setenv JAVA_HOME /opt/j2sdk1_3_0_01/jre
|
||||
setenv PREFIX /opt
|
||||
|
||||
setenv LD_LIBRARY_PATH ${JAVA_HOME}/jre/lib/sparc
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/sparc/classic
|
||||
@@ -15,3 +15,8 @@ setenv PATH ${PATH}:${MOZILLA_FIVE_HOME}:${PREFIX}/bin
|
||||
|
||||
setenv CLASSPATH ${JAVADOM_HOME}/classes:${MOZILLA_FIVE_HOME}/../classes:${PREFIX}/xml/xml.jar:.
|
||||
setenv CLASSPATH ${TEST_PATH}/classes:${CLASSPATH}
|
||||
|
||||
|
||||
setenv LD_PRELOAD libXm.so
|
||||
|
||||
setenv PLUGLET /opt/mozilla.PR3/java/dom/tests/classes
|
||||
|
||||
107
mozilla/java/dom/tests/src/newsrc/DOMViewerFactory.java
Executable file
107
mozilla/java/dom/tests/src/newsrc/DOMViewerFactory.java
Executable file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
* Inc. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Igor Kushnirskiy <idk@eng.sun.com>
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import org.mozilla.pluglet.*;
|
||||
import org.mozilla.pluglet.mozilla.*;
|
||||
|
||||
import org.mozilla.dom.*;
|
||||
|
||||
import java.awt.print.*;
|
||||
import java.awt.*;
|
||||
|
||||
import javax.swing.tree.*;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.w3c.dom.*;
|
||||
import org.mozilla.dom.test.TestLoader;
|
||||
import org.mozilla.dom.test.*;
|
||||
|
||||
public class DOMViewerFactory implements PlugletFactory {
|
||||
public DOMViewerFactory() {
|
||||
}
|
||||
|
||||
public Pluglet createPluglet(String mimeType) {
|
||||
return new DOMViewer();
|
||||
}
|
||||
|
||||
public void initialize(PlugletManager manager) {
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class DOMViewer implements Pluglet {
|
||||
private PlugletPeer peer;
|
||||
private Node rootNode;
|
||||
|
||||
public DOMViewer() {
|
||||
}
|
||||
|
||||
public void initialize(PlugletPeer peer) {
|
||||
try {
|
||||
this.peer = peer;
|
||||
PlugletTagInfo info = peer.getTagInfo();
|
||||
if (info instanceof PlugletTagInfo2) {
|
||||
PlugletTagInfo2 info2 = (PlugletTagInfo2)info;
|
||||
Element e = (Element) info2.getDOMElement();
|
||||
Document doc = e.getOwnerDocument();
|
||||
e = doc.getDocumentElement();
|
||||
//e.normalize();
|
||||
//rootNode = e;
|
||||
|
||||
// TestLoader hooks in here
|
||||
Object obj = (Object) doc;
|
||||
|
||||
TestLoader tl = new TestLoader(obj, 0);
|
||||
if (tl != null) {
|
||||
Object retobj = tl.loadTest();
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void start() {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
public PlugletStreamListener newStream() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setWindow(Frame fr) {
|
||||
}
|
||||
|
||||
public void print(PrinterJob printerJob) {
|
||||
}
|
||||
}
|
||||
50
mozilla/java/dom/tests/src/newsrc/Makefile
Executable file
50
mozilla/java/dom/tests/src/newsrc/Makefile
Executable file
@@ -0,0 +1,50 @@
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
HOMEDIR=../..
|
||||
SRCDIR=$(HOMEDIR)/src/newsrc
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
DOMPLUGLET_JAR=DOMPLUGLET.jar
|
||||
|
||||
|
||||
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
/bin/cp manifest $(CLASSDIR)
|
||||
cd $(CLASSDIR); jar cvfm $(DOMPLUGLET_JAR) manifest org
|
||||
cd $(CLASSDIR); /bin/cp $(DOMPLUGLET_JAR) $(MOZILLA_FIVE_HOME)/../classes; rm -rf *.class
|
||||
|
||||
JAVAFILES= DOMViewerFactory.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
51
mozilla/java/dom/tests/src/newsrc/Makefile.solaris
Executable file
51
mozilla/java/dom/tests/src/newsrc/Makefile.solaris
Executable file
@@ -0,0 +1,51 @@
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
HOMEDIR=../..
|
||||
SRCDIR=$(HOMEDIR)/src/newsrc
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
DOMPLUGLET_JAR=DOMPLUGLET.jar
|
||||
|
||||
|
||||
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
cd $(HOMEDIR); $(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
/bin/cp manifest $(CLASSDIR)
|
||||
cd $(HOMEDIR)/src/api; make
|
||||
cd $(CLASSDIR); jar cvfm $(DOMPLUGLET_JAR) manifest org
|
||||
cd $(CLASSDIR); /bin/cp $(DOMPLUGLET_JAR) $(MOZILLA_FIVE_HOME)/../classes; rm -rf *.class
|
||||
|
||||
JAVAFILES= DOMViewerFactory.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
58
mozilla/java/dom/tests/src/newsrc/Makefile.win
Executable file
58
mozilla/java/dom/tests/src/newsrc/Makefile.win
Executable file
@@ -0,0 +1,58 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
HOMEDIR=..\..
|
||||
SRCDIR=$(HOMEDIR)\src\newsrc
|
||||
CLASSDIR=$(HOMEDIR)\classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org\mozilla\dom\test
|
||||
DOMPACKAGE=org\mozilla\dom
|
||||
DOMPLUGLET_JAR=DOMPLUGLET.jar
|
||||
|
||||
|
||||
JAVAFILES=DOMViewerFactory.java
|
||||
|
||||
|
||||
all: testloader
|
||||
@echo done
|
||||
@cd $(CLASSDIR); jar cvfm $(DOMPLUGLET_JAR) manifest org
|
||||
@cd $(CLASSDIR); cp $(DOMPLUGLET_JAR) $(MOZILLA_FIVE_HOME)\..\classes; del /f/q *.class
|
||||
|
||||
testloader:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)\mozilla.bat"
|
||||
@echo "and execute it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
@echo Building test accessory classes ...
|
||||
@$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
@cp manifest $(CLASSDIR)
|
||||
|
||||
|
||||
clean:
|
||||
del /f/q $(CLASSDIR)\$(TESTPACKAGE)\*.class
|
||||
del /f/q $(CLASSDIR)\$(DOMPACKAGE)\*.class
|
||||
|
||||
|
||||
|
||||
|
||||
121
mozilla/java/dom/tests/src/newsrc/README
Executable file
121
mozilla/java/dom/tests/src/newsrc/README
Executable file
@@ -0,0 +1,121 @@
|
||||
This document describes steps required to run the Test Suite for JavaDOM API
|
||||
throught a PLUGLET.
|
||||
You have to build PLUGLETS before building this
|
||||
( see http://www.mozilla.org/projects/blackwood/java-plugins )
|
||||
|
||||
For Solaris
|
||||
===========
|
||||
1) open mozilla.csh
|
||||
|
||||
2) make changes to variables
|
||||
MOZILLA_FIVE_HOME - Absolute path where mozilla-bin
|
||||
executable is located.
|
||||
JAVA_HOME - Absolute Path to J2SE1.3 dir.
|
||||
TEST_PATH - Absolute Directory Path where file
|
||||
BWTestClass.lst is located.
|
||||
PLUGLET - Absolute dir. where DOMPLUGLET.jar
|
||||
is located
|
||||
|
||||
3) source mozilla.csh
|
||||
this will set up the environment
|
||||
|
||||
4) Edit BWProperties file and change the locations for variables
|
||||
BW_TESTDIR (Absolute Directory Path where file BWTestClass.lst is
|
||||
located)
|
||||
BW_LOGDIR (Absolute Directory Path where log files need to be
|
||||
created)
|
||||
BW_THREADMODE (Execute tests in single thread [S] or
|
||||
multi-thread [M] mode. Takes values S/M.)
|
||||
|
||||
5) Set PLUGLET enviornment to point to classes dir.
|
||||
setenv PLUGLET /opt/mozilla/java/dom/tests/classes
|
||||
|
||||
6) Set LD_PRELOAD to point to libXm.so
|
||||
setenv LD_PRELOAD libXm.so
|
||||
|
||||
7) Invoke autorun.sh from command prompt.
|
||||
sh autorun.sh
|
||||
|
||||
8) The results are recorded in HTML file BWTest.html
|
||||
and in log file BWTest.log
|
||||
Individual test Log files are also found in 'log' directory.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
To Invoke a specific test case
|
||||
sh autorun.sh -t org.mozilla.dom.test.AttrImpl_getName
|
||||
|
||||
NOTE: All TestCase list is recorded in file BWTestClass.lst.ORIG
|
||||
If your machine is slow and loading time of mozilla is high then
|
||||
accordingly increase DELAY_FACTOR to a higher value in autorun.sh.
|
||||
|
||||
|
||||
|
||||
=============================================================================
|
||||
|
||||
For WIN32
|
||||
===========
|
||||
Assumes you have installed PERL and the following variables are set in your environment:
|
||||
MOZILLA_HOME - top directory in mozilla's tree
|
||||
JAVA_HOME - path to JDK
|
||||
|
||||
1) open mozilla.bat
|
||||
|
||||
2) make changes to variables
|
||||
MOZILLA_BIN - Mozilla's executable file name
|
||||
(e.g. mozilla.exe or viewer.exe)
|
||||
TEST_PATH - path to the current directory
|
||||
(where mozilla.bat is)
|
||||
PLUGLET - Absolute dir. where DOMPLUGLET.jar
|
||||
is located
|
||||
|
||||
3) execute mozilla.bat from command prompt
|
||||
this will create new console and set up the environment for this
|
||||
command prompt
|
||||
|
||||
4) Edit BWProperties file and change the locations for variables
|
||||
BW_TESTDIR (Absolute Directory Path where file BWTestClass.lst is
|
||||
located)
|
||||
BW_LOGDIR (Absolute Directory Path where log files need to be
|
||||
created)
|
||||
BW_THREADMODE (Execute tests in single thread [S] or
|
||||
multi-thread [M] mode. Takes values S/M.)
|
||||
|
||||
|
||||
NOTE: Since on Windows file separator is a `\`, it should be escaped
|
||||
by another '\'. So if a file is in c:\mozilla\tests then it
|
||||
would be written as c:\\mozilla\\tests.
|
||||
|
||||
|
||||
5) Invoke autorun.pl from command prompt.
|
||||
perl autorun.pl
|
||||
|
||||
6) The results are recorded in HTML file BWTest.html
|
||||
and in log file BWTest.log
|
||||
Individual test Log files are also found in 'log' directory.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
To Invoke a specific test case
|
||||
perl autorun.pl -t org.mozilla.dom.test.AttrImpl_getName
|
||||
|
||||
NOTE: All Test Cases are recorded in file BWTestClass.lst.ORIG
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
||||
BUGS:
|
||||
|
||||
Currently a bug is filed against getDocumentType method of object Document.
|
||||
for XML (see Bugzilla ID: 15118).
|
||||
Hence all the tests which depend on the same will fail, namely
|
||||
DocumentTypeImpl->getEntities
|
||||
DocumentTypeImpl->getInternalSubset
|
||||
DocumentTypeImpl->getName
|
||||
DocumentTypeImpl->getNotations
|
||||
DocumentTypeImpl->getPublicId
|
||||
DocumentTypeImpl->getSystemId
|
||||
DocumentImpl->getDoctype_xml
|
||||
|
||||
2
mozilla/java/dom/tests/src/newsrc/manifest
Executable file
2
mozilla/java/dom/tests/src/newsrc/manifest
Executable file
@@ -0,0 +1,2 @@
|
||||
MIMEDescription: application/dom-pluglet::Pluglet DOM Viewer
|
||||
Pluglet-Class: org.mozilla.dom.test.DOMViewerFactory
|
||||
38
mozilla/java/dom/tests/src/newsrc/mozilla.bat
Normal file
38
mozilla/java/dom/tests/src/newsrc/mozilla.bat
Normal file
@@ -0,0 +1,38 @@
|
||||
rem @ECHO off
|
||||
set BLACKWOOD_HOME=%MOZILLA_HOME%
|
||||
set MOZILLA_FIVE_HOME=%MOZILLA_HOME%\dist\WIN32_D.OBJ\bin
|
||||
set JAVADOM_HOME=%MOZILLA_HOME%\java\dom
|
||||
rem Mozilla binary file name
|
||||
set MOZILLA_BIN=mozilla.exe
|
||||
set JAVA_HOME=%JAVAHOME%
|
||||
|
||||
rem path to the SRC directory of the JavaDOM tests
|
||||
set TEST_PATH=E:\Mozilla\BW_SQE\Tests_accessor\src\JavaDOM\CoreLevel1\src
|
||||
|
||||
|
||||
rem if this variable is set then we register DOMDocumentListener through TestLoader applet
|
||||
rem (currently avilable on Win32 only)
|
||||
rem otherwise hacked DOMAccessorImpl class is used for running tests
|
||||
set USE_APPLET_FOR_REGISTRATION=1
|
||||
|
||||
if %USE_APPLET_FOR_REGISTRATION%x==1x del %TEST_PATH%\..\classes\org\mozilla\dom\DOMAccessorImpl.class 2> nul;
|
||||
if %USE_APPLET_FOR_REGISTRATION%x==1x del %TEST_PATH%\..\classes\org\mozilla\dom\DocumentImpl.class 2> nul;
|
||||
|
||||
rem url of the directory where you placed test.html and test.xml
|
||||
rem complete URL looks like that: $TEST_PATH/test.html(xml)
|
||||
rem if you register DOMDocumentListener through TestLoader applet (by default under Win32) then
|
||||
rem url below is unused - it should be set in the BWProperties file
|
||||
rem (BW_HTMLTEST and BW_XMLTEST properties)
|
||||
rem (file:/test.html and file:/test.xml URLs are used by default)
|
||||
set TEST_URL=file:
|
||||
|
||||
set PATH=%JAVA_HOME%\bin;%PATH%
|
||||
set PATH=%MOZILLA_FIVE_HOME%;%PATH%
|
||||
|
||||
set CLASSPATH=%TEST_PATH%\..\classes;%JAVADOM_HOME%\tests\classes;%MOZILLA_FIVE_HOME%\..\classes;%CLASSPATH%
|
||||
|
||||
set PLUGLET=%JAVADOM_HOME%\..\tests\classes
|
||||
|
||||
rem creating new console window with these variables being set
|
||||
start
|
||||
|
||||
22
mozilla/java/dom/tests/src/newsrc/mozilla.csh
Executable file
22
mozilla/java/dom/tests/src/newsrc/mozilla.csh
Executable file
@@ -0,0 +1,22 @@
|
||||
setenv TEST_PATH `pwd`/../..
|
||||
setenv MOZILLA_FIVE_HOME `pwd`/../../../../../dist/bin
|
||||
setenv JAVADOM_HOME `pwd`/../../../
|
||||
setenv JAVA_HOME /opt/j2sdk1_3_0_01/jre
|
||||
setenv PREFIX /opt
|
||||
|
||||
setenv LD_LIBRARY_PATH ${JAVA_HOME}/jre/lib/sparc
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/sparc/classic
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/sparc/native_threads
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PREFIX}/lib:${PREFIX}/mozilla/dist/lib
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${MOZILLA_FIVE_HOME}
|
||||
|
||||
setenv PATH ${JAVA_HOME}/bin:${PATH}
|
||||
setenv PATH ${PATH}:${MOZILLA_FIVE_HOME}:${PREFIX}/bin
|
||||
|
||||
setenv CLASSPATH ${JAVADOM_HOME}/classes:${MOZILLA_FIVE_HOME}/../classes:${PREFIX}/xml/xml.jar:.
|
||||
setenv CLASSPATH ${TEST_PATH}/classes:${CLASSPATH}
|
||||
|
||||
|
||||
setenv LD_PRELOAD libXm.so
|
||||
|
||||
setenv PLUGLET /opt/mozilla.PR3/java/dom/tests/classes
|
||||
7
mozilla/java/dom/tests/src/newsrc/test.html
Executable file
7
mozilla/java/dom/tests/src/newsrc/test.html
Executable file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body name="hello_body">
|
||||
<EMBED type="application/dom-pluglet" width=0 height=0>
|
||||
</EMBED>
|
||||
Hello
|
||||
</body>
|
||||
</html>
|
||||
39
mozilla/java/dom/tests/src/newsrc/testxml.html
Executable file
39
mozilla/java/dom/tests/src/newsrc/testxml.html
Executable file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY Myimage SYSTEM "Image.gif" NDATA GIF>
|
||||
<!NOTATION GIF SYSTEM "/usr/dist/local/exe/xv">
|
||||
|
||||
|
||||
<!ELEMENT head (title, script, base)>
|
||||
|
||||
<!ELEMENT title (#PCDATA)>
|
||||
<!ELEMENT script (#PCDATA)>
|
||||
|
||||
<!ELEMENT base EMPTY>
|
||||
<!ATTLIST base
|
||||
target CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT body (#PCDATA)>
|
||||
<!ATTLIST body
|
||||
name CDATA #IMPLIED
|
||||
id CDATA #IMPLIED
|
||||
bgcolor CDATA #IMPLIED >
|
||||
|
||||
<!ENTITY myentity "New Entity">
|
||||
|
||||
<!ELEMENT EMBED (#PCDATA)>
|
||||
<!ATTLIST EMBED
|
||||
type CDATA #IMPLIED
|
||||
width CDATA #IMPLIED
|
||||
height CDATA #IMPLIED >
|
||||
|
||||
]>
|
||||
|
||||
<html>
|
||||
<body name="hello_body" id="body_tag_id">
|
||||
Hello1
|
||||
<EMBED type="application/dom-pluglet" width="0" height="0">
|
||||
</EMBED>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,7 @@
|
||||
<html>
|
||||
<body name="hello_body" id="body_tag_id" bgcolor="blue">
|
||||
<body name="hello_body">
|
||||
<EMBED type="application/dom-pluglet" width=0 height=0>
|
||||
</EMBED>
|
||||
Hello
|
||||
</body>
|
||||
</html>
|
||||
|
||||
39
mozilla/java/dom/tests/src/testxml.html
Executable file
39
mozilla/java/dom/tests/src/testxml.html
Executable file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY Myimage SYSTEM "Image.gif" NDATA GIF>
|
||||
<!NOTATION GIF SYSTEM "/usr/dist/local/exe/xv">
|
||||
|
||||
|
||||
<!ELEMENT head (title, script, base)>
|
||||
|
||||
<!ELEMENT title (#PCDATA)>
|
||||
<!ELEMENT script (#PCDATA)>
|
||||
|
||||
<!ELEMENT base EMPTY>
|
||||
<!ATTLIST base
|
||||
target CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT body (#PCDATA)>
|
||||
<!ATTLIST body
|
||||
name CDATA #IMPLIED
|
||||
id CDATA #IMPLIED
|
||||
bgcolor CDATA #IMPLIED >
|
||||
|
||||
<!ENTITY myentity "New Entity">
|
||||
|
||||
<!ELEMENT EMBED (#PCDATA)>
|
||||
<!ATTLIST EMBED
|
||||
type CDATA #IMPLIED
|
||||
width CDATA #IMPLIED
|
||||
height CDATA #IMPLIED >
|
||||
|
||||
]>
|
||||
|
||||
<html>
|
||||
<body name="hello_body" id="body_tag_id">
|
||||
Hello1
|
||||
<EMBED type="application/dom-pluglet" width="0" height="0">
|
||||
</EMBED>
|
||||
</body>
|
||||
</html>
|
||||
46
mozilla/java/external/Makefile.win
vendored
Normal file
46
mozilla/java/external/Makefile.win
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the java enhancers to mozilla
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..\..
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
export::
|
||||
if not exist $(DEPTH)\dist\classes $(MKDIR) $(DEPTH)\dist\classes
|
||||
cd $(DEPTH)\dist\classes
|
||||
$(JDKHOME)\bin\jar -xf ..\..\java\external\dom2.jar
|
||||
|
||||
clobber_all::
|
||||
$(RM) -rf $(DEPTH)\dist\classes\org\w3c
|
||||
10
mozilla/java/external/README
vendored
Normal file
10
mozilla/java/external/README
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
This Directory contains files needed by the Blackwood project components,
|
||||
that are external to the Mozilla project.
|
||||
|
||||
- dom2.jar
|
||||
This is a .jar file of all the org.w3c.dom classes built from source
|
||||
files published by the W3C. This jar file was created using sources
|
||||
available on May 10 2000 from the W3C HomePage http://www.w3.org/
|
||||
This jar contains the Interfaces for the JavaDOM spec as defined by
|
||||
the consortium.
|
||||
|
||||
BIN
mozilla/java/external/dom2-20000510.jar
vendored
BIN
mozilla/java/external/dom2-20000510.jar
vendored
Binary file not shown.
BIN
mozilla/java/external/dom2.jar
vendored
BIN
mozilla/java/external/dom2.jar
vendored
Binary file not shown.
@@ -29,6 +29,8 @@ DIRS= \
|
||||
src \
|
||||
jni \
|
||||
classes \
|
||||
test \
|
||||
examples \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -29,6 +29,8 @@ DIRS= \
|
||||
src \
|
||||
jni \
|
||||
classes \
|
||||
test \
|
||||
examples \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -63,14 +63,14 @@ Requirements:
|
||||
|
||||
* current mozilla built tree
|
||||
|
||||
* JDK1.2 or JDK1.3
|
||||
* JDK1.3
|
||||
|
||||
* Perl 5 must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie export JDKHOME=/usr/local/jdk1.2
|
||||
directory, ie export JDKHOME=/usr/local/jdk1.3
|
||||
|
||||
* Add following directories to to your LD_LIBRARY_PATH:
|
||||
|
||||
@@ -84,13 +84,13 @@ How to Run:
|
||||
* Add $MOZILLA_FILE_HOME/../classes to your CLASSPATH
|
||||
|
||||
How to build and run test
|
||||
|
||||
* go to the test directory and type "gmake"
|
||||
test.jar will be placed in mozilla/dist/bin/plugins directory
|
||||
|
||||
* Set PLUGLET environment to the directory you have test.jar
|
||||
|
||||
* Run mozilla and load page test.html from test directory and if everething is ok you will see
|
||||
some awt demo.
|
||||
* set LD_PRELOAD to libXm.so
|
||||
|
||||
* Run mozilla and load page resource:///res/javadev/pluglets/test.html and if everething is ok you will see some awt demo.
|
||||
|
||||
|
||||
========================================================================
|
||||
@@ -101,3 +101,5 @@ Problems:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,11 @@ public class PlugletInputStream extends InputStream {
|
||||
nativeInitialize();
|
||||
}
|
||||
public int read() throws IOException {
|
||||
read(buf,0,1);
|
||||
return buf[0];
|
||||
if (read(buf,0,1) < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return buf[0] & 0xff;
|
||||
}
|
||||
}
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
if (b == null) {
|
||||
|
||||
@@ -43,7 +43,9 @@ public class PlugletStreamInfoImpl implements PlugletStreamInfo {
|
||||
* @param offset the start point for reading.
|
||||
* @param length the number of bytes to be read.
|
||||
*/
|
||||
public native void requestRead(ByteRanges ranges);
|
||||
public void requestRead(ByteRanges ranges) {
|
||||
throw(new UnsupportedOperationException("PlugletStreamInfo.requestRead not implemented yet"));
|
||||
}
|
||||
protected void finalize() {
|
||||
nativeFinalize();
|
||||
}
|
||||
|
||||
@@ -61,12 +61,16 @@ public class PlugletTagInfo2Impl implements PlugletTagInfo2 {
|
||||
/* Get the complete text of the HTML tag that was
|
||||
* used to instantiate this pluglet
|
||||
*/
|
||||
public native String getTagText();
|
||||
public String getTagText() {
|
||||
throw(new UnsupportedOperationException("PlugletTagInfo2.getTagText not implemented yet"));
|
||||
}
|
||||
public native String getDocumentBase();
|
||||
/* Return an encoding whose name is specified in:
|
||||
* http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303
|
||||
*/
|
||||
public native String getDocumentEncoding();
|
||||
public String getDocumentEncoding() {
|
||||
throw(new UnsupportedOperationException("PlugletTagInfo2.getDocumentEncoding not implemented yet"));
|
||||
}
|
||||
public native String getAlignment();
|
||||
public native int getWidth();
|
||||
public native int getHeight();
|
||||
|
||||
75
mozilla/java/plugins/config/rules.mk
Normal file
75
mozilla/java/plugins/config/rules.mk
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Igor Kushnirskiy idk@eng.sun.com
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
ifneq ($(PACKAGE_BUILD),)
|
||||
JAVADEV=$(DIST)/javadev
|
||||
PLUGLETS_DIR=$(JAVADEV)/example
|
||||
MISC_DIR=$(JAVADEV)/misc
|
||||
HTML_DIR=$(JAVADEV)/misc
|
||||
INSTALL = $(DEPTH)/config/nsinstall -m 666
|
||||
else
|
||||
PLUGLETS_DIR=$(DIST)/bin/plugins
|
||||
MISC_DIR=$(DIST)/bin/res/javadev/pluglets
|
||||
HTML_DIR=$(DIST)/bin/res/javadev/pluglets
|
||||
endif
|
||||
|
||||
$(PLUGLET).jar: $(CLASSES) manifest
|
||||
$(JDKHOME)/bin/jar cvfm $(PLUGLET).jar manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath .:../../classes:$(CLASSPATH):JavaDOM.jar $<
|
||||
clobber:
|
||||
rm -f *.class *.jar
|
||||
|
||||
clean : clobber
|
||||
|
||||
ifneq ($(PLUGLET),)
|
||||
INSTALL_DEPS += install_pluglet
|
||||
endif
|
||||
|
||||
ifneq ($(HTML),)
|
||||
INSTALL_DEPS += install_html
|
||||
endif
|
||||
|
||||
ifneq ($(MISC),)
|
||||
INSTALL_DEPS += install_misc
|
||||
endif
|
||||
|
||||
|
||||
install_pluglet: $(PLUGLET).jar
|
||||
$(INSTALL) $(PLUGLET).jar $(PLUGLETS_DIR)
|
||||
|
||||
install_html :
|
||||
$(INSTALL) $(HTML) $(HTML_DIR)
|
||||
|
||||
install_misc :
|
||||
$(INSTALL) $(MISC) $(MISC_DIR)
|
||||
|
||||
install: $(INSTALL_DEPS)
|
||||
|
||||
export: install
|
||||
|
||||
35
mozilla/java/plugins/examples/Makefile.in
Normal file
35
mozilla/java/plugins/examples/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS= \
|
||||
zip \
|
||||
rtf \
|
||||
dom \
|
||||
demo \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
JMPlayer.jar: JMPlayer.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm JMPlayer.jar manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath ../classes:$(CLASSPATH) $<
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
install:
|
||||
cp *.jar $(PLUGLET)
|
||||
@@ -18,14 +18,9 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
JView.jar: JView.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm JView.jar manifest *.class
|
||||
PLUGLET=JMPlayer
|
||||
CLASSES=JMPlayer.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath ../classes:$(CLASSPATH) $<
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
install:
|
||||
cp *.jar $(PLUGLET)
|
||||
include ../../config/rules.mk
|
||||
@@ -18,14 +18,11 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
ZipView.jar: ZipView.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm ZipView.jar manifest *.class
|
||||
HTML=index.html
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath ../classes:$(CLASSPATH) $<
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
install:
|
||||
cp *.jar $(PLUGLET)
|
||||
include ../../config/rules.mk
|
||||
|
||||
export:
|
||||
cp pluglet_run.sh $(DEPTH)/bin
|
||||
12
mozilla/java/plugins/examples/demo/index.html
Normal file
12
mozilla/java/plugins/examples/demo/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<title>
|
||||
Pluglets demo
|
||||
</title>
|
||||
<body>
|
||||
<ul>
|
||||
<li> <a href="test.html" target="new"> Test plulets </a>
|
||||
<li> <a href="dom.html" target="new"> DOM viewer plulets </a>
|
||||
<li> <a href="zip.html" target="new"> Zip viewer plulets </a>
|
||||
</ul>
|
||||
</body>
|
||||
</thml>
|
||||
4
mozilla/java/plugins/examples/demo/pluglet_run.sh
Executable file
4
mozilla/java/plugins/examples/demo/pluglet_run.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
LD_PRELOAD=libXm.so
|
||||
export LD_PRELOAD
|
||||
./mozilla resource:///res/javadev/pluglets/index.html
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
|
||||
DOMViewer.jar: DOMViewerFactory.class DOMAccessPanel.class DOMTreeDumper.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm DOMViewer.jar manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath .:../../classes:$(CLASSPATH):JavaDOM.jar $<
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
install:
|
||||
cp *.jar $(PLUGLET)
|
||||
@@ -18,14 +18,13 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
test.jar: test.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm test.jar manifest *.class
|
||||
PLUGLET=DOMViewer
|
||||
CLASSES=DOMViewerFactory.class DOMAccessPanel.class DOMTreeDumper.class
|
||||
HTML=dom.html
|
||||
|
||||
include ../../config/rules.mk
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath ../classes $<
|
||||
|
||||
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
@@ -18,14 +18,9 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
PDFView.jar: PDFView.class manifest
|
||||
$(JDKHOME)/bin/jar cvfm PDFView.jar manifest *.class
|
||||
PLUGLET=PDFView.jar
|
||||
CLASSES=PDFView.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath ../classes:$(CLASSPATH) $<
|
||||
clobber:
|
||||
rm *.class *.jar
|
||||
install:
|
||||
cp *.jar $(PLUGLET)
|
||||
include ../../config/rules.mk
|
||||
26
mozilla/java/plugins/examples/rtf/Makefile.in
Normal file
26
mozilla/java/plugins/examples/rtf/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
PLUGLET=JView
|
||||
CLASSES=JView.class
|
||||
|
||||
include ../../config/rules.mk
|
||||
34
mozilla/java/plugins/examples/zip/Makefile.in
Normal file
34
mozilla/java/plugins/examples/zip/Makefile.in
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
PLUGLET=ZipView
|
||||
CLASSES=ZipView.class
|
||||
|
||||
MISC=ZipView.jar
|
||||
HTML=zip.html
|
||||
|
||||
include ../../config/rules.mk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInputStream_close
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInputStream_nativeRead
|
||||
(JNIEnv *env, jobject jthis, jbyteArray b, jint off, jint len) {
|
||||
PRUint32 retval = 0;
|
||||
jint retval = -1;
|
||||
nsIInputStream * input = (nsIInputStream*)env->GetLongField(jthis, peerFID);
|
||||
if (input) {
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
@@ -91,17 +91,19 @@ JNIEXPORT jint JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInputStream_nativ
|
||||
//nb throw OutOfMemory
|
||||
}
|
||||
nsresult res;
|
||||
res = input->Read((char*)bufElems,(PRUint32)len,&retval);
|
||||
PRUint32 actualLen;
|
||||
res = input->Read((char*)bufElems,(PRUint32)len,&actualLen);
|
||||
if (NS_FAILED(res)) {
|
||||
free(bufElems);
|
||||
return retval;
|
||||
}
|
||||
retval = actualLen;
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
("PlugletInputStream.nativeRead: %i bytes read\n", retval));
|
||||
|
||||
env->SetByteArrayRegion(b,off,retval,bufElems);
|
||||
free(bufElems);
|
||||
return retval;
|
||||
return (len > 0 && actualLen <= 0) ? -1 : retval;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -183,13 +183,15 @@ void PlugletEngine::StartJVM() {
|
||||
("PlugletEngine::StartJVM we got already started JVM\n"));
|
||||
return;
|
||||
}
|
||||
char classpath[1024];
|
||||
char classpath[1024]="";
|
||||
JavaVMInitArgs vm_args;
|
||||
JavaVMOption options[2];
|
||||
|
||||
sprintf(classpath, "-Djava.class.path=%s",PR_GetEnv("CLASSPATH"));
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
("PlugletEngine::StartJVM about to create JVM classpath=%s\n",classpath));
|
||||
char * classpathEnv = PR_GetEnv("CLASSPATH");
|
||||
if (classpath != NULL) {
|
||||
sprintf(classpath, "-Djava.class.path=%s",classpathEnv);
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
("PlugletEngine::StartJVM about to create JVM classpath=%s\n",classpath));
|
||||
}
|
||||
options[0].optionString = classpath;
|
||||
options[1].optionString=""; //-Djava.compiler=NONE";
|
||||
vm_args.version = 0x00010002;
|
||||
|
||||
@@ -179,7 +179,7 @@ int PlugletFactory::Compare(const char *mimeType) {
|
||||
char *p1 = mimeDescription;
|
||||
char *p2 = strchr(p1,';');
|
||||
while ( p1 != NULL && p1 < terminator ) {
|
||||
size_t n = sizeof(char) * ( ( (p2 == NULL) ? terminator : p2) - p1 );
|
||||
size_t n = sizeof(char) * ( ( (p2 == NULL || p2 > terminator) ? terminator : p2) - p1 );
|
||||
if (PL_strncasecmp(p1,mimeType,n) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -28,12 +28,6 @@
|
||||
#include <Xm/PushB.h>
|
||||
#include <Xm/DrawingA.h>
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <gdksuperwin.h>
|
||||
#include <gtkmozbox.h>
|
||||
|
||||
#include "PlugletViewMotif.h"
|
||||
#include "PlugletEngine.h"
|
||||
|
||||
@@ -67,6 +61,10 @@ static Colormap awt_cmap;
|
||||
static Visual * awt_visual;
|
||||
static int awt_num_colors;
|
||||
|
||||
static void (*AwtLock)(JNIEnv *);
|
||||
static void (*AwtUnLock)(JNIEnv *);
|
||||
static void (*AwtNoFlushUnLock)(JNIEnv *);
|
||||
|
||||
void PlugletViewMotif::Initialize() {
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
("PlugletViewMotif.Initialize\n"));
|
||||
@@ -83,6 +81,7 @@ void PlugletViewMotif::Initialize() {
|
||||
return;
|
||||
}
|
||||
getAwtData(&awt_depth, &awt_cmap, &awt_visual, &awt_num_colors, NULL);
|
||||
getAwtLockFunctions(&AwtLock, &AwtUnLock, &AwtNoFlushUnLock,NULL);
|
||||
}
|
||||
|
||||
PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
|
||||
@@ -100,7 +99,7 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
|
||||
|| !win->window) {
|
||||
if (win && !win->window) {
|
||||
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
|
||||
("PlugletViewMotif.SetWindow win->window = NULL. We have a bug in plugin module. this=%p\n",this));
|
||||
("PlugletViewMotif.SetWindow win->window = NULL. We have a bug in plugin module. this=%p\n",this));
|
||||
}
|
||||
if (frame) {
|
||||
env->DeleteGlobalRef(frame);
|
||||
@@ -112,30 +111,16 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
GdkSuperWin * superWin = (GdkSuperWin *) win->window;
|
||||
Window parentWindowID;
|
||||
Window rootWindowID;
|
||||
Window * childrenWindowIDs;
|
||||
unsigned int numberOfChildren;
|
||||
int containerWindowID = GDK_WINDOW_XWINDOW(superWin->shell_window);
|
||||
|
||||
Status status = XQueryTree(GDK_DISPLAY(), containerWindowID,
|
||||
&rootWindowID, &parentWindowID,
|
||||
&childrenWindowIDs, & numberOfChildren);
|
||||
if (numberOfChildren >= 1) {
|
||||
containerWindowID = childrenWindowIDs[0];
|
||||
}
|
||||
if (WindowID == containerWindowID) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
WindowID = containerWindowID;
|
||||
void (*AwtLock)(JNIEnv *);
|
||||
void (*AwtUnLock)(JNIEnv *);
|
||||
void (*AwtNoFlushUnLock)(JNIEnv *);
|
||||
getAwtLockFunctions(&AwtLock, &AwtUnLock, &AwtNoFlushUnLock,NULL);
|
||||
AwtLock(env);
|
||||
int containerWindowID = win->window;
|
||||
printf("containerWindowID=%d WindowID=%d\n",containerWindowID, WindowID);
|
||||
#if 0
|
||||
if (WindowID == containerWindowID) {
|
||||
printf("about to return false\n");
|
||||
return PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
WindowID = containerWindowID;
|
||||
Display *awt_display = getAwtDisplay();
|
||||
XSync(awt_display, FALSE);
|
||||
Arg args[40];
|
||||
|
||||
26
mozilla/java/plugins/test/Makefile.in
Normal file
26
mozilla/java/plugins/test/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH= ../../..
|
||||
|
||||
PLUGLET=test
|
||||
CLASSES=test.class
|
||||
HTML=test.html
|
||||
include ../config/rules.mk
|
||||
@@ -76,9 +76,12 @@ ifneq ($(PACKAGE_BUILD),)
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/blackwood.$(VERSION_NUMBER).jar ; then rm -f $(PACKAGE_LIB)/blackwood.$(VERSION_NUMBER).jar ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/blackwood.jar ; then rm -f $(PACKAGE_LIB)/blackwood.jar ; else true ; fi ;
|
||||
jar -xvf $(topsrcdir)/java/external/dom2.jar $(topsrcdir)/dist/classes/.
|
||||
jar -cvf $(PACKAGE_LIB)/blackwood.$(VERSION_NUMBER).jar $(topsrcdir)/dist/classes/org
|
||||
ln -s blackwood.$(VERSION_NUMBER).jar $(PACKAGE_LIB)/blackwood.jar
|
||||
cd $(topsrcdir)/dist/classes ; \
|
||||
jar -xvf ../../java/external/dom2.jar ; \
|
||||
jar -cvfM0 blackwood.$(VERSION_NUMBER).jar org ; \
|
||||
cp blackwood.$(VERSION_NUMBER).jar ../javadev/lib/blackwood.$(VERSION_NUMBER).jar ;
|
||||
cd $(topsrcdir)/dist/javadev/lib ; \
|
||||
ln -s blackwood.$(VERSION_NUMBER).jar $(PACKAGE_LIB)/blackwood.jar ;
|
||||
endif
|
||||
|
||||
doc::
|
||||
|
||||
@@ -20,6 +20,62 @@
|
||||
* Contributor(s): Ed Burns <edburns@acm.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
* W3C® IPR SOFTWARE NOTICE
|
||||
|
||||
* Copyright © 1994-2000 World Wide Web Consortium, (Massachusetts
|
||||
* Institute of Technology, Institut National de Recherche en
|
||||
* Informatique et en Automatique, Keio University). All Rights
|
||||
* Reserved. http://www.w3.org/Consortium/Legal/
|
||||
|
||||
* This W3C work (including software, documents, or other related items) is
|
||||
* being provided by the copyright holders under the following
|
||||
* license. By obtaining, using and/or copying this work, you (the
|
||||
* licensee) agree that you have read, understood, and will comply with
|
||||
* the following terms and conditions:
|
||||
|
||||
* Permission to use, copy, and modify this software and its documentation,
|
||||
* with or without modification, for any purpose and without fee or
|
||||
* royalty is hereby granted, provided that you include the following on
|
||||
* ALL copies of the software and documentation or portions thereof,
|
||||
* including modifications, that you make:
|
||||
|
||||
* The full text of this NOTICE in a location viewable to users of the
|
||||
* redistributed or derivative work.
|
||||
|
||||
* Any pre-existing intellectual property disclaimers, notices, or terms
|
||||
* and conditions. If none exist, a short notice of the following form
|
||||
* (hypertext is preferred, text is permitted) should be used within the
|
||||
* body of any redistributed or derivative code: "Copyright ©
|
||||
* [$date-of-software] World Wide Web Consortium, (Massachusetts
|
||||
* Institute of Technology, Institut National de Recherche en
|
||||
* Informatique et en Automatique, Keio University). All Rights
|
||||
* Reserved. http://www.w3.org/Consortium/Legal/"
|
||||
|
||||
* Notice of any changes or modifications to the W3C files, including
|
||||
* the date changes were made. (We recommend you provide URIs to the
|
||||
* location from which the code is derived.)
|
||||
|
||||
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
|
||||
* HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR
|
||||
* FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
|
||||
* DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
|
||||
* TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
|
||||
* SOFTWARE OR DOCUMENTATION.
|
||||
|
||||
* The name and trademarks of copyright holders may NOT be used in
|
||||
* advertising or publicity pertaining to the software without specific,
|
||||
* written prior permission. Title to copyright in this software and any
|
||||
* associated documentation will at all times remain with copyright
|
||||
* holders.
|
||||
|
||||
*/
|
||||
|
||||
package org.mozilla.webclient;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -54,7 +54,7 @@ import org.w3c.dom.Document;
|
||||
* This is a test application for using the BrowserControl.
|
||||
|
||||
*
|
||||
* @version $Id: EMWindow.java,v 1.21 2000-09-20 21:53:01 edburns%acm.org Exp $
|
||||
* @version $Id: EMWindow.java,v 1.22 2000-11-02 23:33:10 edburns%acm.org Exp $
|
||||
*
|
||||
* @see org.mozilla.webclient.BrowserControlFactory
|
||||
|
||||
@@ -113,34 +113,34 @@ public class EMWindow extends Frame implements DialogClient, ActionListener, Doc
|
||||
// Create the Menu Bar
|
||||
menuBar = new MenuBar();
|
||||
this.setMenuBar(menuBar);
|
||||
Menu fileMenu = new Menu("File");
|
||||
// Menu fileMenu = new Menu("File");
|
||||
Menu viewMenu = new Menu("View");
|
||||
Menu searchMenu = new Menu("Search");
|
||||
// Menu searchMenu = new Menu("Search");
|
||||
Menu editMenu = new Menu("Edit");
|
||||
MenuItem newItem = new MenuItem("New Window");
|
||||
MenuItem closeItem = new MenuItem("Close");
|
||||
MenuItem findItem = new MenuItem("Find");
|
||||
MenuItem findNextItem = new MenuItem("Find Next");
|
||||
// MenuItem newItem = new MenuItem("New Window");
|
||||
// MenuItem closeItem = new MenuItem("Close");
|
||||
// MenuItem findItem = new MenuItem("Find");
|
||||
// MenuItem findNextItem = new MenuItem("Find Next");
|
||||
MenuItem sourceItem = new MenuItem("View Page Source");
|
||||
MenuItem pageInfoItem = new MenuItem("View Page Info");
|
||||
MenuItem selectAllItem = new MenuItem("Select All");
|
||||
MenuItem copyItem = new MenuItem("Copy");
|
||||
menuBar.add(fileMenu);
|
||||
// menuBar.add(fileMenu);
|
||||
menuBar.add(viewMenu);
|
||||
menuBar.add(searchMenu);
|
||||
// menuBar.add(searchMenu);
|
||||
menuBar.add(editMenu);
|
||||
fileMenu.add(newItem);
|
||||
newItem.addActionListener(this);
|
||||
fileMenu.add(closeItem);
|
||||
closeItem.addActionListener(this);
|
||||
searchMenu.add(findItem);
|
||||
findItem.addActionListener(this);
|
||||
searchMenu.add(findNextItem);
|
||||
findNextItem.addActionListener(this);
|
||||
// fileMenu.add(newItem);
|
||||
// newItem.addActionListener(this);
|
||||
// fileMenu.add(closeItem);
|
||||
// closeItem.addActionListener(this);
|
||||
// searchMenu.add(findItem);
|
||||
// findItem.addActionListener(this);
|
||||
// searchMenu.add(findNextItem);
|
||||
// findNextItem.addActionListener(this);
|
||||
viewMenu.add(sourceItem);
|
||||
sourceItem.addActionListener(this);
|
||||
viewMenu.add(pageInfoItem);
|
||||
pageInfoItem.addActionListener(this);
|
||||
// viewMenu.add(pageInfoItem);
|
||||
// pageInfoItem.addActionListener(this);
|
||||
editMenu.add(selectAllItem);
|
||||
selectAllItem.addActionListener(this);
|
||||
editMenu.add(copyItem);
|
||||
@@ -165,8 +165,8 @@ public class EMWindow extends Frame implements DialogClient, ActionListener, Doc
|
||||
stopButton.setEnabled(false);
|
||||
refreshButton = makeItem(buttonsPanel, "Refresh", 3, 0, 1, 1, 0.0, 0.0);
|
||||
refreshButton.setEnabled(false);
|
||||
makeItem(buttonsPanel, "Bookmarks", 4, 0, 1, 1, 0.0, 0.0);
|
||||
makeItem(buttonsPanel, "DOMViewer", 5, 0, 1, 1, 0.0, 0.0);
|
||||
// makeItem(buttonsPanel, "Bookmarks", 4, 0, 1, 1, 0.0, 0.0);
|
||||
// makeItem(buttonsPanel, "DOMViewer", 5, 0, 1, 1, 0.0, 0.0);
|
||||
|
||||
// Create the control panel
|
||||
controlPanel = new Panel();
|
||||
@@ -312,7 +312,7 @@ public void delete()
|
||||
domViewer.setVisible(false);
|
||||
domViewer.dispose();
|
||||
domViewer = null;
|
||||
}
|
||||
}
|
||||
BrowserControlFactory.deleteBrowserControl(browserControl);
|
||||
browserControl = null;
|
||||
this.hide();
|
||||
|
||||
@@ -103,18 +103,23 @@ public void findInPage(String stringToFind, boolean forward, boolean matchCase)
|
||||
ParameterCheck.nonNull(stringToFind);
|
||||
myFactory.throwExceptionIfNotInitialized();
|
||||
|
||||
synchronized(myBrowserControl) {
|
||||
/* synchronized(myBrowserControl) {
|
||||
nativeFindInPage(nativeWebShell, stringToFind, forward, matchCase);
|
||||
}
|
||||
}*/
|
||||
|
||||
throw new UnimplementedException("\nUnimplementedException -----\n API Function CurrentPage::findInPage is not implemented in Webclient release 0.9\n");
|
||||
|
||||
}
|
||||
|
||||
public void findNextInPage(boolean forward)
|
||||
{
|
||||
myFactory.throwExceptionIfNotInitialized();
|
||||
|
||||
synchronized(myBrowserControl) {
|
||||
/* synchronized(myBrowserControl) {
|
||||
nativeFindNextInPage(nativeWebShell, forward);
|
||||
}
|
||||
}*/
|
||||
|
||||
throw new UnimplementedException("\nUnimplementedException -----\n API Function CurrentPage::findNextInPage is not implemented in Webclient release 0.9\n");
|
||||
}
|
||||
|
||||
public String getCurrentURL()
|
||||
@@ -211,9 +216,11 @@ public void resetFind()
|
||||
{
|
||||
myFactory.throwExceptionIfNotInitialized();
|
||||
|
||||
synchronized(myBrowserControl) {
|
||||
/* synchronized(myBrowserControl) {
|
||||
nativeResetFind(nativeWebShell);
|
||||
}
|
||||
}*/
|
||||
|
||||
throw new UnimplementedException("\nUnimplementedException -----\n API Function CurrentPage::resetFind is not implemented in Webclient release 0.9\n");
|
||||
}
|
||||
|
||||
public void selectAll()
|
||||
@@ -261,7 +268,7 @@ public static void main(String [] args)
|
||||
Assert.setEnabled(true);
|
||||
Log.setApplicationName("CurrentPageImpl");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: CurrentPageImpl.java,v 1.8 2000-07-22 02:48:25 edburns%acm.org Exp $");
|
||||
Log.setApplicationVersionDate("$Id: CurrentPageImpl.java,v 1.9 2000-11-02 23:33:12 edburns%acm.org Exp $");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ WindowControlImpl.java
|
||||
public void delete()
|
||||
{
|
||||
nativeWebShell = -1;
|
||||
System.out.println("debug: edburns: ImplObjectNative.delete()");
|
||||
System.out.println("ImplObjectNative.delete()");
|
||||
super.delete();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public Object newImpl(String interfaceName,
|
||||
interfaceName +
|
||||
": not implemented.");
|
||||
}
|
||||
System.out.println("debug: edburns: native library does implement " +
|
||||
System.out.println("native library does implement " +
|
||||
interfaceName);
|
||||
if (BrowserControl.WINDOW_CONTROL_NAME == interfaceName) {
|
||||
result = new WindowControlImpl(this, browserControl);
|
||||
@@ -222,7 +222,7 @@ public static void main(String [] args)
|
||||
WrapperFactory me = new WrapperFactoryImpl();
|
||||
Log.setApplicationName("WrapperFactoryImpl");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: WrapperFactoryImpl.java,v 1.2 2000-03-07 22:10:08 ashuk%eng.sun.com Exp $");
|
||||
Log.setApplicationVersionDate("$Id: WrapperFactoryImpl.java,v 1.3 2000-11-02 23:33:13 edburns%acm.org Exp $");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,166 +1,160 @@
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = $(topsrcdir)/java/webclient/src_moz
|
||||
VPATH = $(topsrcdir)/java/webclient/src_moz
|
||||
|
||||
# We don't need to build the stubs in the BAL case.
|
||||
ifeq ($(BAL_INTERFACE),)
|
||||
DIRS = motif
|
||||
endif
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
LIBRARY_NAME = webclient_bal
|
||||
else
|
||||
LIBRARY_NAME = webclient
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
ns_util.cpp \
|
||||
ns_util_export.cpp \
|
||||
dom_util.cpp \
|
||||
nsActions.cpp \
|
||||
rdf_util.cpp \
|
||||
BookmarksImpl.cpp \
|
||||
CBrowserContainer.cpp \
|
||||
CurrentPageImpl.cpp \
|
||||
HistoryImpl.cpp \
|
||||
ISupportsPeer.cpp \
|
||||
NativeEventThread.cpp \
|
||||
NavigationImpl.cpp \
|
||||
RDFEnumeration.cpp \
|
||||
RDFTreeNode.cpp \
|
||||
WindowControlImpl.cpp \
|
||||
WrapperFactoryImpl.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
motif/MotifBrowserControlCanvas.cpp \
|
||||
motif/gtkmozilla.cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
ifndef MOZ_MONOLITHIC_TOOLKIT
|
||||
CXXFLAGS += $(MOZ_GTK_CFLAGS)
|
||||
CFLAGS += $(MOZ_GTK_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -L/usr/X11R6/lib -lXt
|
||||
else
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
CFLAGS += $(TK_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -L/usr/X11R6/lib -lXt
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
CXXFLAGS += -DBAL_INTERFACE
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/lib -L$(DEPTH)/dist/bin/components -lwidget_gtk
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
EXTRA_DSO_LDOPTS += -lwc_share_bal
|
||||
else
|
||||
EXTRA_DSO_LDOPTS += -lwc_share
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/linux $(INCLUDES) \
|
||||
-I$(DEPTH)/widget/src/gtk -I../src_share
|
||||
else
|
||||
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/solaris $(INCLUDES) \
|
||||
-I$(DEPTH)/widget/src/gtk -I../src_share
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PACKAGE_BUILD),)
|
||||
ifneq ($(VERSION_NUMBER),)
|
||||
VERSION_NUMBER=0.9
|
||||
endif # VERSION_NUMBER
|
||||
PACKAGE_DIR=$(topsrcdir)/dist/javadev
|
||||
PACKAGE_LIB=$(PACKAGE_DIR)/lib
|
||||
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
|
||||
endif # PACKAGE_BUILD
|
||||
|
||||
export:: linkSetupRegistry
|
||||
|
||||
linkSetupRegistry:
|
||||
rm -f nsSetupRegistry.cpp
|
||||
ln -s $(DEPTH)/xpfe/bootstrap/nsSetupRegistry.cpp .
|
||||
|
||||
clobber_all::
|
||||
rm -f nsSetupRegistry.cpp
|
||||
|
||||
buildRunems:
|
||||
ifeq ($(BAL_INTERFACE),)
|
||||
ifeq ($(PACKAGE_BUILD),)
|
||||
@echo +++ Creating runem. Use this to run the test browser.
|
||||
rm -f runem
|
||||
@echo #!/bin/sh > runem
|
||||
@echo $(PERL) ../src_share/runem.pl $(DIST)/bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
||||
chmod 755 runem
|
||||
else
|
||||
@echo +++ Commercial Packaging - Creating runem. Used to run test
|
||||
rm -f runem
|
||||
@echo #!/bin/sh > runem
|
||||
@echo $(PERL) runem.pl ../../ org.mozilla.test.EmbeddedMozilla "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
||||
chmod 755 runem
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
cp $(topsrcdir)/dist/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/lib/libwc_share.a $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libpluglet.so $(topsrcdir)/dist/bin/components/libpluglet.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libjavadom.so $(topsrcdir)/dist/bin/components/libjavadom.so.$(VERSION_NUMBER)
|
||||
rm -r $(topsrcdir)/dist/bin/components/libpluglet.so
|
||||
rm -r $(topsrcdir)/dist/bin/components/libjavadom.so
|
||||
chmod 555 $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(topsrcdir)/dist/bin/components/libpluglet.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(topsrcdir)/dist/bin/components/libjavadom.so.$(VERSION_NUMBER)
|
||||
if test ! -d $(PACKAGE_LIB)/libwc_share.a ; then ln -s libwc_share.a.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwc_share.a ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libwebclientstub.so ; then ln -s libwebclientstub.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclientstub.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libwebclient.so ; then ln -s libwebclient.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclient.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libjavadomjni.so ; then ln -s libjavadomjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadomjni.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libplugletjni.so ; then ln -s libplugletjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libplugletjni.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libpluglet.so ; then ln -s libpluglet.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libpluglet.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libjavadom.so ; then ln -s libjavadom.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadom.so ; else true ; fi ;
|
||||
if test ! -d $(topsrcdir)/dist/bin/components/libpluglet.so ; then ln -s libpluglet.so.$(VERSION_NUMBER) $(topsrcdir)/dist/bin/components/libpluglet.so ; else true ; fi ;
|
||||
if test ! -d $(topsrcdir)/dist/bin/components/libjavadom.so ; then ln -s libjavadom.so.$(VERSION_NUMBER) $(topsrcdir)/dist/bin/components/libjavadom.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE)/runem ; then cp $(topsrcdir)/java/webclient/src_moz/runem $(PACKAGE_EXAMPLE)/runem ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE)/runem.pl ; then cp $(topsrcdir)/java/webclient/src_share/runem_commercial.pl $(PACKAGE_EXAMPLE)/runem.pl ; else true ; fi ;
|
||||
chmod 755 $(PACKAGE_EXAMPLE)/runem.pl
|
||||
endif # PACKAGE_BUILD
|
||||
endif # BAL_INTERFACE
|
||||
|
||||
install:: buildRunems
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = $(topsrcdir)/java/webclient/src_moz
|
||||
VPATH = $(topsrcdir)/java/webclient/src_moz
|
||||
|
||||
# We don't need to build the stubs in the BAL case.
|
||||
ifeq ($(BAL_INTERFACE),)
|
||||
DIRS = motif
|
||||
endif
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
LIBRARY_NAME = webclient_bal
|
||||
else
|
||||
LIBRARY_NAME = webclient
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
ns_util.cpp \
|
||||
ns_util_export.cpp \
|
||||
dom_util.cpp \
|
||||
nsActions.cpp \
|
||||
rdf_util.cpp \
|
||||
BookmarksImpl.cpp \
|
||||
CBrowserContainer.cpp \
|
||||
CurrentPageImpl.cpp \
|
||||
HistoryImpl.cpp \
|
||||
ISupportsPeer.cpp \
|
||||
NativeEventThread.cpp \
|
||||
NavigationImpl.cpp \
|
||||
RDFEnumeration.cpp \
|
||||
RDFTreeNode.cpp \
|
||||
WindowControlImpl.cpp \
|
||||
WrapperFactoryImpl.cpp \
|
||||
motif/MotifBrowserControlCanvas.cpp \
|
||||
motif/gtkmozilla.cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
ifndef MOZ_MONOLITHIC_TOOLKIT
|
||||
CXXFLAGS += $(MOZ_GTK_CFLAGS)
|
||||
CFLAGS += $(MOZ_GTK_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -lwc_share -lembed_base_s -lxpfelocation_s -L/usr/X11R6/lib -lXt
|
||||
else
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
CFLAGS += $(TK_CFLAGS)
|
||||
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -lwc_share -lembed_base_s -lxpfelocation_s -L/usr/X11R6/lib -lXt
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
CXXFLAGS += -DBAL_INTERFACE
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/lib -L$(DEPTH)/dist/bin/components -lwidget_gtk
|
||||
|
||||
ifneq ($(BAL_INTERFACE),)
|
||||
EXTRA_DSO_LDOPTS += -lwc_share_bal
|
||||
else
|
||||
EXTRA_DSO_LDOPTS += -lwc_share
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/linux $(INCLUDES) \
|
||||
-I$(DEPTH)/widget/src/gtk -I../src_share
|
||||
else
|
||||
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/solaris $(INCLUDES) \
|
||||
-I$(DEPTH)/widget/src/gtk -I../src_share
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PACKAGE_BUILD),)
|
||||
ifneq ($(VERSION_NUMBER),)
|
||||
VERSION_NUMBER=0.9
|
||||
endif # VERSION_NUMBER
|
||||
PACKAGE_DIR=$(topsrcdir)/dist/javadev
|
||||
PACKAGE_LIB=$(PACKAGE_DIR)/lib
|
||||
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
|
||||
endif # PACKAGE_BUILD
|
||||
|
||||
clobber_all::
|
||||
|
||||
buildRunems:
|
||||
ifeq ($(BAL_INTERFACE),)
|
||||
ifeq ($(PACKAGE_BUILD),)
|
||||
@echo +++ Creating runem. Use this to run the test browser.
|
||||
rm -f runem
|
||||
@echo #!/bin/sh > runem
|
||||
@echo $(PERL) ../src_share/runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
||||
chmod 755 runem
|
||||
else
|
||||
@echo +++ Commercial Packaging - Copying runem_solaris. Used to run test
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
cp $(topsrcdir)/dist/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/lib/libwc_share.a $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
||||
cp $(topsrcdir)/dist/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
||||
rm -f $(topsrcdir)/dist/bin/libwebclientstub.so
|
||||
rm -f $(topsrcdir)/dist/lib/libwebclientstub.so
|
||||
rm -f $(topsrcdir)/dist/bin/libwebclient.so
|
||||
rm -f $(topsrcdir)/dist/lib/libwebclient.so
|
||||
rm -f $(topsrcdir)/dist/lib/libwc_share.a
|
||||
rm -f $(topsrcdir)/dist/bin/libjavadomjni.so
|
||||
rm -f $(topsrcdir)/dist/lib/libjavadomjni.so
|
||||
rm -f $(topsrcdir)/dist/bin/libplugletjni.so
|
||||
rm -f $(topsrcdir)/dist/lib/libplugletjni.so
|
||||
rm -f $(topsrcdir)/dist/bin/components/libpluglet.so
|
||||
rm -f $(topsrcdir)/dist/lib/components/libpluglet.so
|
||||
rm -f $(topsrcdir)/dist/bin/components/libjavadom.so
|
||||
rm -f $(topsrcdir)/dist/lib/components/libjavadom.so
|
||||
chmod 555 $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
||||
chmod 555 $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
||||
if test ! -d $(PACKAGE_LIB)/libwc_share.a ; then ln -s libwc_share.a.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwc_share.a ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libwebclientstub.so ; then ln -s libwebclientstub.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclientstub.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libwebclient.so ; then ln -s libwebclient.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclient.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libjavadomjni.so ; then ln -s libjavadomjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadomjni.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libplugletjni.so ; then ln -s libplugletjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libplugletjni.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libpluglet.so ; then ln -s libpluglet.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libpluglet.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB)/libjavadom.so ; then ln -s libjavadom.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadom.so ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE)/runem ; then cp $(topsrcdir)/java/webclient/src_share/runem_solaris $(PACKAGE_EXAMPLE)/runem ; else true ; fi ;
|
||||
chmod 755 $(PACKAGE_EXAMPLE)/runem
|
||||
cp $(topsrcdir)/java/README.commercial $(PACKAGE_DIR)/README
|
||||
endif # PACKAGE_BUILD
|
||||
endif # BAL_INTERFACE
|
||||
|
||||
install:: buildRunems
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ OBJS = \
|
||||
.\$(OBJDIR)\RDFEnumeration.obj \
|
||||
.\$(OBJDIR)\RDFTreeNode.obj \
|
||||
.\$(OBJDIR)\ISupportsPeer.obj \
|
||||
# .\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
@@ -76,7 +75,6 @@ LLIBS = \
|
||||
$(DIST)\lib\nspr4.lib \
|
||||
$(DIST)\lib\plc4.lib \
|
||||
$(DIST)\lib\plds4.lib \
|
||||
# $(DEPTH)\xpfe\bootstrap\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
$(NULL)
|
||||
|
||||
WIN_LIBS= \
|
||||
@@ -121,17 +119,13 @@ INCS = \
|
||||
!CMDSWITCHES -S
|
||||
|
||||
# generate the jni header
|
||||
export:: nsSetupRegistry.cpp
|
||||
|
||||
nsSetupRegistry.cpp:
|
||||
copy $(MOZ_SRC)\mozilla\xpfe\bootstrap\nsSetupRegistry.cpp
|
||||
|
||||
buildRunems:
|
||||
!ifdef BAL_INTERFACE
|
||||
!else
|
||||
@echo +++ Creating runem.bat. Use this to run the test browser.
|
||||
rm -f runem.bat
|
||||
@echo $(PERL) ..\src_share\runem.pl $(DIST)\bin org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem.bat
|
||||
@echo $(PERL) ..\src_share\runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem.bat
|
||||
!endif
|
||||
|
||||
install:: $(DLL) buildRunems
|
||||
@@ -142,6 +136,5 @@ clobber_all:: clobber
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f nsSetupRegistry.cpp
|
||||
rm -f runem.bat
|
||||
|
||||
|
||||
@@ -113,14 +113,6 @@ extern const char * gBinDir; // defined in WrapperFactoryImpl.cpp
|
||||
|
||||
#endif // XP_PC
|
||||
|
||||
//
|
||||
// Functions to hook into mozilla
|
||||
//
|
||||
|
||||
extern "C" void NS_SetupRegistry();
|
||||
extern nsresult NS_AutoregisterComponents();
|
||||
|
||||
|
||||
//
|
||||
// Local functions
|
||||
//
|
||||
@@ -410,7 +402,7 @@ int processEventLoop(WebShellInitContext * initContext)
|
||||
|
||||
// PENDING(edburns): revisit this. Not sure why this is necessary, but
|
||||
// this fixes bug 44327
|
||||
printf("%c", 8); // 8 is ASCII for backspace
|
||||
// printf("%c", 8); // 8 is ASCII for backspace
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -455,7 +447,6 @@ void DoMozInitialization(WebShellInitContext * initContext)
|
||||
// It is vitally important to call NS_InitEmbedding before calling
|
||||
// anything else.
|
||||
NS_InitEmbedding(pathFile, nsnull);
|
||||
// NS_SetupRegistry();
|
||||
rv = NS_GetGlobalComponentManager(&gComponentManager);
|
||||
if (NS_FAILED(rv)) {
|
||||
::util_ThrowExceptionToJava(env, "NS_GetGlobalComponentManager() failed.");
|
||||
@@ -471,8 +462,6 @@ void DoMozInitialization(WebShellInitContext * initContext)
|
||||
gComponentManager->RegisterComponentLib(kSHistoryCID, nsnull,
|
||||
nsnull, APPSHELL_DLL,
|
||||
PR_FALSE, PR_FALSE);
|
||||
NS_AutoregisterComponents();
|
||||
|
||||
// handle the profile manager nonsense
|
||||
nsCOMPtr<nsICmdLineService> cmdLine =do_GetService(kCmdLineServiceCID);
|
||||
nsCOMPtr<nsIProfile> profile = do_GetService(NS_PROFILE_CONTRACTID);
|
||||
@@ -645,10 +634,6 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext)
|
||||
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(initContext->docShell));
|
||||
webShell->SetContainer(wsContainer);
|
||||
|
||||
// set the URIContentListener
|
||||
nsCOMPtr<nsIURIContentListener> contentListener(do_QueryInterface(initContext->browserContainer));
|
||||
webBrowser->SetParentURIContentListener(contentListener);
|
||||
|
||||
// set the TreeOwner
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(initContext->docShell));
|
||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner(do_QueryInterface(initContext->browserContainer));
|
||||
@@ -688,7 +673,7 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext)
|
||||
}
|
||||
|
||||
initContext->initComplete = TRUE;
|
||||
|
||||
|
||||
#if DEBUG_RAPTOR_CANVAS
|
||||
if (prLogModuleInfo) {
|
||||
PR_LOG(prLogModuleInfo, 3,
|
||||
|
||||
@@ -98,8 +98,9 @@ gtk_mozilla_get_type (void)
|
||||
sizeof (GtkMozillaClass),
|
||||
(GtkClassInitFunc) gtk_mozilla_class_init,
|
||||
(GtkObjectInitFunc) gtk_mozilla_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
mozilla_type = gtk_type_unique (GTK_TYPE_LAYOUT, &mozilla_info);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "rdf_util.h"
|
||||
#include "rdf_progids.h"
|
||||
|
||||
#include "ns_globals.h" // for prLogModuleInfo and gComponentManager
|
||||
|
||||
@@ -45,6 +44,8 @@ nsCOMPtr<nsIRDFResource> kNC_Folder = nsnull;
|
||||
nsCOMPtr<nsIRDFResource> kRDF_type = nsnull;
|
||||
|
||||
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
|
||||
|
||||
nsresult rdf_InitRDFUtils()
|
||||
{
|
||||
@@ -75,7 +76,7 @@ nsresult rdf_InitRDFUtils()
|
||||
|
||||
if (nsnull == gRDF) {
|
||||
// get the RDF service
|
||||
gRDF = do_GetService(NS_RDFSERVICE_PROGID, &rv);
|
||||
gRDF = do_GetService(kRDFServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
@@ -83,7 +84,7 @@ nsresult rdf_InitRDFUtils()
|
||||
|
||||
if (nsnull == gRDFCU) {
|
||||
// get the RDF service
|
||||
gRDFCU = do_GetService(NS_CONTAINERUTILS_PROGID, &rv);
|
||||
gRDFCU = do_GetService(kRDFContainerUtilsCID, &rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
@@ -313,6 +314,13 @@ void rdf_recursiveResourceTraversal(nsCOMPtr<nsIRDFResource> currentResource)
|
||||
|
||||
void rdf_printArcLabels(nsCOMPtr<nsIRDFResource> currentResource)
|
||||
{
|
||||
if (!currentResource) {
|
||||
if (prLogModuleInfo) {
|
||||
PR_LOG(prLogModuleInfo, 3, ("resource: null\n"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> labels;
|
||||
nsCOMPtr<nsISupports> supportsResult;
|
||||
nsCOMPtr<nsIRDFResource> resourceResult;
|
||||
|
||||
@@ -28,10 +28,13 @@
|
||||
# Verification, usage checking
|
||||
#
|
||||
$ARGC = $#ARGV + 1;
|
||||
$MIN_ARGC = 3;
|
||||
$MIN_ARGC = 2;
|
||||
|
||||
if ($MIN_ARGC > $ARGC) {
|
||||
print "usage runem.pl <mozilla bin dir> <class name> <depth>\n";
|
||||
if ($MIN_ARGC > $ARGC || !($ENV{"MOZILLA_FIVE_HOME"})) {
|
||||
if (!($ENV{"MOZILLA_FIVE_HOME"})) {
|
||||
print "MOZILLA_FIVE_HOME must be set to the absolute path\nto the mozilla bin directory.\n";
|
||||
}
|
||||
print "usage runem.pl <class name> <depth>\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
@@ -39,8 +42,8 @@ if ($MIN_ARGC > $ARGC) {
|
||||
# Constant definitions
|
||||
#
|
||||
|
||||
$CLASSNAME = $ARGV[1];
|
||||
$DEPTH = $ARGV[2];
|
||||
$CLASSNAME = $ARGV[0];
|
||||
$DEPTH = $ARGV[1];
|
||||
|
||||
# determine the path separator
|
||||
$_ = $ENV{PATH};
|
||||
@@ -57,31 +60,14 @@ if ($SEP eq "/") {
|
||||
$IS_UNIX = 1;
|
||||
}
|
||||
|
||||
if ($IS_UNIX) {
|
||||
# Under red hat linux $ENV{"PWD"} is undefined,
|
||||
# so it only appends a '/' to argv[0].
|
||||
if ( $ENV{"PWD"} == "" ) {
|
||||
$BINDIR = $ARGV[0];
|
||||
}
|
||||
else {
|
||||
$BINDIR = $ENV{"PWD"} . $SEP . $ARGV[0];
|
||||
}
|
||||
}
|
||||
else {
|
||||
open(CD, "cd |");
|
||||
$_ = <CD>;
|
||||
chop;
|
||||
close(CD);
|
||||
$BINDIR = $_ . $SEP . $ARGV[0];
|
||||
}
|
||||
$BINDIR = $ENV{"MOZILLA_FIVE_HOME"};
|
||||
|
||||
$JAVA_CMD = $ENV{"JDKHOME"} . $SEP . "bin" . $SEP . "java";
|
||||
|
||||
#
|
||||
# set up environment vars
|
||||
#
|
||||
|
||||
$ENV{"MOZILLA_FIVE_HOME"} = $BINDIR;
|
||||
|
||||
# prepend mozilla dist to path
|
||||
$ENV{PATH} = $BINDIR . $CPSEP . $ENV{PATH};
|
||||
|
||||
|
||||
@@ -28,10 +28,13 @@
|
||||
# Verification, usage checking
|
||||
#
|
||||
$ARGC = $#ARGV + 1;
|
||||
$MIN_ARGC = 2;
|
||||
$MIN_ARGC = 1;
|
||||
|
||||
if ($MIN_ARGC > $ARGC) {
|
||||
print "usage runem.pl <mozilla bin dir> <class name>\n";
|
||||
if ($MIN_ARGC > $ARGC || !($ENV{"MOZILLA_FIVE_HOME"})) {
|
||||
if (!($ENV{"MOZILLA_FIVE_HOME"})) {
|
||||
print "MOZILLA_FIVE_HOME must be set to the absolute path\nto the mozilla bin directory.\n";
|
||||
}
|
||||
print "usage runem.pl <class name>\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ if ($MIN_ARGC > $ARGC) {
|
||||
# Constant definitions
|
||||
#
|
||||
|
||||
$CLASSNAME = $ARGV[1];
|
||||
$CLASSNAME = $ARGV[0];
|
||||
|
||||
# determine the path separator
|
||||
$_ = $ENV{PATH};
|
||||
@@ -56,31 +59,14 @@ if ($SEP eq "/") {
|
||||
$IS_UNIX = 1;
|
||||
}
|
||||
|
||||
if ($IS_UNIX) {
|
||||
# Under red hat linux $ENV{"PWD"} is undefined,
|
||||
# so it only appends a '/' to argv[0].
|
||||
if ( $ENV{"PWD"} == "" ) {
|
||||
$BINDIR = $ARGV[0];
|
||||
}
|
||||
else {
|
||||
$BINDIR = $ENV{"PWD"} . $SEP . $ARGV[0];
|
||||
}
|
||||
}
|
||||
else {
|
||||
open(CD, "cd |");
|
||||
$_ = <CD>;
|
||||
chop;
|
||||
close(CD);
|
||||
$BINDIR = $_ . $SEP . $ARGV[0];
|
||||
}
|
||||
$BINDIR = $ENV{"MOZILLA_FIVE_HOME"};
|
||||
|
||||
$JAVA_CMD = $ENV{"JDKHOME"} . $SEP . "bin" . $SEP . "java";
|
||||
|
||||
#
|
||||
# set up environment vars
|
||||
#
|
||||
|
||||
$ENV{"MOZILLA_FIVE_HOME"} = $BINDIR;
|
||||
|
||||
# prepend mozilla dist to path
|
||||
$ENV{PATH} = $BINDIR . $CPSEP . $ENV{PATH};
|
||||
|
||||
@@ -113,11 +99,12 @@ $ENV{"CLASSPATH"} = $ENV{"JDKHOME"} . $SEP . "lib" . $SEP . "tools.jar" .
|
||||
$CPSEP . $ENV{"JDKHOME"} . $SEP . "lib" . $SEP . "rt.jar" . $CPSEP .
|
||||
$ENV{"CLASSPATH"};
|
||||
if ($IS_UNIX) {
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP . $BINDIR . $SEP . ".." .
|
||||
$SEP . "classes";
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP . $BINDIR . $SEP . "javadev" .
|
||||
$SEP . "lib" . $SEP . "blackwood.jar";
|
||||
}
|
||||
else {
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP ."../lib" . $SEP . "blackwood.jar";
|
||||
$ENV{"CLASSPATH"} = $ENV{"CLASSPATH"} . $CPSEP . $BINDIR . $SEP . "javadev" .
|
||||
$SEP . "lib" . $SEP . "blackwood.jar";
|
||||
}
|
||||
|
||||
# build up the command invocation string
|
||||
@@ -128,7 +115,8 @@ if ($SEP eq "/") {
|
||||
$cmd = $cmd . " -native";
|
||||
}
|
||||
#tack on the java library path
|
||||
$cmd = $cmd . " -Djava.library.path=" . $BINDIR;
|
||||
$cmd = $cmd . " -Djava.library.path=" . $BINDIR . $CPSEP . $BINDIR . $SEP .
|
||||
"javadev" . $SEP . "lib";
|
||||
#tack on the classpath, class name, and bin dir
|
||||
$cmd = $cmd . " -classpath " . $ENV{"CLASSPATH"} . " " . $CLASSNAME . " " .
|
||||
$BINDIR;
|
||||
|
||||
47
mozilla/java/webclient/src_share/runem_solaris
Normal file
47
mozilla/java/webclient/src_share/runem_solaris
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
script_args=""
|
||||
if [ $# -gt 0 ]; then
|
||||
script_args=$1
|
||||
else
|
||||
script_args="auto.blank"
|
||||
fi
|
||||
|
||||
echo "args = $script_args"
|
||||
|
||||
JDKHOME=`pwd`/../../java
|
||||
MOZILLA_FIVE_HOME=`pwd`/../..
|
||||
|
||||
ARCH=`uname -p`
|
||||
|
||||
LD_LIBRARY_PATH=$JDKHOME/lib/$ARCH/client:$JDKHOME/lib/$ARCH:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$JDKHOME/lib:$JDKHOME/lib/$ARCH/native_threads:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../lib:`pwd`/../..:`pwd`/../../components:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../../dist/lib:$LD_LIBRARY_PATH
|
||||
|
||||
echo "LD_LIBRARY_PATH =" $LD_LIBRARY_PATH
|
||||
|
||||
if [ "$CLASSPATH" = "" ]; then
|
||||
CLASSPATH=$JDKHOME/lib/tools.jar:$JDKHOME/lib/rt.jar:`pwd`/../lib/blackwood.jar
|
||||
else
|
||||
CLASSPATH=$JDKHOME/lib/tools.jar:$JDKHOME/lib/rt.jar:`pwd`/../lib/blackwood.jar:$CLASSPATH
|
||||
fi
|
||||
|
||||
echo "CLASSPATH =" $CLASSPATH
|
||||
|
||||
libpath=`pwd`/../..:`pwd`/../../components:`pwd`/../lib
|
||||
testclass="org.mozilla.webclient.test.EmbeddedMozilla"
|
||||
bindir=`pwd`/../..
|
||||
|
||||
export LD_LIBRARY_PATH
|
||||
export CLASSPATH
|
||||
export JDKHOME
|
||||
export MOZILLA_FIVE_HOME
|
||||
|
||||
args="-native -Djava.library.path=$libpath -classpath $CLASSPATH $testclass $bindir $script_args"
|
||||
|
||||
cmd="$JDKHOME/bin/java $args"
|
||||
echo "CMD = " $cmd
|
||||
|
||||
eval $cmd
|
||||
Reference in New Issue
Block a user