зеркало из https://github.com/mozilla/pjs.git
Merged branch JAVADEV_PR3_20001002 into trunk.
This commit is contained in:
Родитель
59708a710f
Коммит
3d2d027ddd
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!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 = ../..
|
||||
VPATH = .
|
||||
srcdir = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = src jni classes
|
||||
|
||||
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;
|
||||
|
|
|
@ -1,64 +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):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
MODULE = javadom
|
||||
LIBRARY_NAME = javadom
|
||||
IS_COMPONENT = 1
|
||||
|
||||
CPPSRCS = \
|
||||
nsJavaDOMImpl.cpp
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
INCLUDES += -I$(JAVAHOME)/include -I$(JAVAHOME)/include/linux
|
||||
DSO_LDOPTS += \
|
||||
-L$(JAVAHOME)/jre/lib/i386 \
|
||||
-L$(JAVAHOME)/jre/lib/i386/classic \
|
||||
-L$(JAVAHOME)/jre/lib/i386/native_threads \
|
||||
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386 \
|
||||
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386/classic \
|
||||
-Xlinker -rpath $(JAVAHOME)/jre/lib/i386/native_threads \
|
||||
-ljvm -lhpi
|
||||
DEFINES += -DDISABLE_JIT
|
||||
else
|
||||
INCLUDES += -I$(JAVAHOME)/include -I$(JAVAHOME)/include/solaris
|
||||
DSO_LDOPTS += \
|
||||
-L$(JAVAHOME)/jre/lib/sparc \
|
||||
-L$(JAVAHOME)/jre/lib/sparc/classic \
|
||||
-L$(JAVAHOME)/jre/lib/sparc/native_threads \
|
||||
-R$(JAVAHOME)/jre/lib/sparc \
|
||||
-R$(JAVAHOME)/jre/lib/sparc/classic \
|
||||
-R$(JAVAHOME)/jre/lib/sparc/native_threads \
|
||||
-ljvm -lhpi
|
||||
endif
|
||||
|
||||
EXPORTS = \
|
||||
nsIJavaDOM.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.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
|
||||
|
||||
|
|
|
@ -1,59 +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):
|
||||
|
||||
|
||||
HOMEDIR=../
|
||||
SRCDIR=$(HOMEDIR)/src
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
cd $(CLASSDIR); jar cvf testdom.jar org
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
TestLoader.java \
|
||||
ParamCombination.java \
|
||||
ReflectionTest.java \
|
||||
BWTestThread.java \
|
||||
BWJavaTemplate.java
|
||||
|
||||
DOMFILE= DocumentImpl.java \
|
||||
DOMAccessor.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
/bin/rm $(CLASSDIR)/$(DOMPACKAGE)/DOMFactory.class ;
|
||||
cd api; make clean
|
||||
|
||||
|
|
@ -1,60 +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):
|
||||
|
||||
|
||||
|
||||
HOMEDIR=../
|
||||
SRCDIR=$(HOMEDIR)/src
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
cd $(CLASSDIR); jar cvf testdom.jar org
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
TestLoader.java \
|
||||
ParamCombination.java \
|
||||
ReflectionTest.java \
|
||||
BWTestThread.java \
|
||||
BWJavaTemplate.java
|
||||
|
||||
DOMFILE= DocumentImpl.java \
|
||||
DOMAccessor.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
/bin/rm $(CLASSDIR)/$(DOMPACKAGE)/DOMFactory.class ;
|
||||
cd api; make clean
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
#!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
|
||||
CLASSDIR=$(HOMEDIR)\classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org\mozilla\dom\test
|
||||
DOMPACKAGE=org\mozilla\dom
|
||||
|
||||
GENERATOR_FILES=BWJavaTemplate.java \
|
||||
ReflectionTest.java \
|
||||
ParamCombination.java
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
TestLoader.java \
|
||||
ParamCombination.java \
|
||||
ReflectionTest.java \
|
||||
BWTestThread.java \
|
||||
BWJavaTemplate.java
|
||||
|
||||
|
||||
DOMFILE=DOMAccessor.java \
|
||||
DocumentImpl.java
|
||||
|
||||
all: testloader accessor
|
||||
@echo done
|
||||
@cd api
|
||||
@nmake -f Makefile.win
|
||||
|
||||
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)
|
||||
|
||||
|
||||
accessor:
|
||||
!if !defined(USE_APPLET_FOR_REGISTRATION)
|
||||
@echo Building DOMAccessor ...
|
||||
@$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
!endif
|
||||
|
||||
|
||||
generator:
|
||||
javac $(GENERATOR_FILES) -d $(CLASSDIR)
|
||||
|
||||
clean:
|
||||
del /f/q $(CLASSDIR)\$(TESTPACKAGE)\*.class
|
||||
del /f/q $(CLASSDIR)\$(DOMPACKAGE)\*.class
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
This document describes steps required to run the Test Suite for JavaDOM API.
|
||||
|
||||
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 JDK 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.
|
||||
|
||||
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.)
|
||||
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).
|
||||
|
||||
6) Invoke autorun.sh from command prompt.
|
||||
sh autorun.sh
|
||||
|
||||
7) 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 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.
|
||||
|
||||
|
||||
|
||||
=============================================================================
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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.)
|
||||
|
||||
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
|
||||
would be written as c:\\mozilla\\tests.
|
||||
|
||||
|
||||
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
|
||||
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
|
||||
|
|
@ -1,528 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# 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):
|
||||
|
||||
###################################################################
|
||||
# This script is used to invoke all test case for DOM API
|
||||
# through mozilla_bin and to recored their results
|
||||
#
|
||||
#
|
||||
|
||||
# Attach Perl Libraries
|
||||
use Cwd;
|
||||
use File::Copy;
|
||||
use Win32::Process;
|
||||
|
||||
###################################################################
|
||||
|
||||
#sometimes we need to specify additional parameters for mozilla
|
||||
$ADDITIONAL_PARAMETERS="-P mozProfile";
|
||||
|
||||
# time in seconds after which the mozilla has to be killed.
|
||||
# by default the mozilla will be up for so much time regardless of
|
||||
# whether over or not. User can either decrease it or increase it.
|
||||
#
|
||||
$DELAY_FACTOR = 15;
|
||||
# time period in seconds of periodically checking: is the mozilla still alive
|
||||
$DELAY_OF_CYCLE = 5;
|
||||
|
||||
$TESTROOT = $ENV{"TEST_PATH"};
|
||||
$DOCROOT = $ENV{"TEST_URL"};
|
||||
|
||||
# delimiter for logfile
|
||||
$delimiter="###################################################\n";
|
||||
|
||||
# win32 specific values
|
||||
# STILL_ALIVE is a constant defined in winbase.h and indicates what
|
||||
# process still alive
|
||||
$STILL_ALIVE = 0x103;
|
||||
|
||||
$path_separator = ";";
|
||||
|
||||
|
||||
|
||||
##################################################################
|
||||
# Usage
|
||||
##################################################################
|
||||
sub usage() {
|
||||
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print " perl autorun.pl [ -t <test case> ]\n";
|
||||
print "\n";
|
||||
print " where <test case> is one of the test cases prefixed with package\n";
|
||||
print " name ex: org.mozilla.dom.AttrImpl_getSpecified\n";
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
##################################################################
|
||||
# Title display
|
||||
##################################################################
|
||||
sub title() {
|
||||
|
||||
print "\n";
|
||||
print "################################################\n";
|
||||
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 " TEST_URL environment variable should contain the URL of \n";
|
||||
print " this directory.\n";
|
||||
print "\n";
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
##################################################################
|
||||
#
|
||||
# check which tests to run. XML/HTML or both
|
||||
#
|
||||
##################################################################
|
||||
sub checkRun() {
|
||||
$runtype = "0";
|
||||
while( true ) {
|
||||
print "Run 1) HTML Test suite.\n";
|
||||
print " 2) XML Test suite.\n";
|
||||
print " 3) BOTH HTML and XML.\n";
|
||||
print "Enter choice (1-3) :\n";
|
||||
$runtype = getc;
|
||||
|
||||
if(( $runtype ne "1" ) &&
|
||||
( $runtype ne "2" ) &&
|
||||
( $runtype ne "3" ) )
|
||||
{
|
||||
print "Invaid choice. Range is from 1-3...\n";
|
||||
print "\n";
|
||||
next;
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Append table entries to Output HTML File
|
||||
#
|
||||
#########################################################################
|
||||
sub appendEntries() {
|
||||
print LOGHTML "<tr><td></td><td></td></tr>\n";
|
||||
print LOGHTML "<tr><td></td><td></td></tr>\n";
|
||||
print LOGHTML "<tr bgcolor=\"#FF6666\"><td>Test Status (XML)</td><td>Result</td></tr>\n";
|
||||
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct Output HTML file Header
|
||||
#
|
||||
#########################################################################
|
||||
sub constructHTMLHeader() {
|
||||
print LOGHTML "<html><head><title>\n";
|
||||
print LOGHTML "DOMAPI Core Level 1 Test Status\n";
|
||||
print LOGHTML "</title></head><body bgcolor=\"white\">\n";
|
||||
print LOGHTML "<center><h1>\n";
|
||||
print LOGHTML "DOM API Automated TestRun Results\n";
|
||||
$date = localtime;
|
||||
print LOGHTML "</h1><h2>", $date;
|
||||
print LOGHTML "</h2></center>\n";
|
||||
print LOGHTML "<hr noshade>";
|
||||
print LOGHTML "<table bgcolor=\"#99FFCC\">\n";
|
||||
print LOGHTML "<tr bgcolor=\"#FF6666\">\n";
|
||||
print LOGHTML "<td>Test Case</td>\n";
|
||||
print LOGHTML "<td>Result</td>\n";
|
||||
print LOGHTML "</tr>\n";
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct Output HTML file indicating status of each run
|
||||
#
|
||||
#########################################################################
|
||||
sub constructHTMLBody() {
|
||||
|
||||
$x=`sort -u $LOGTXT > $LOGTXT.tmp`;
|
||||
$y=`rename $LOGTXT.tmp $LOGTXT`;
|
||||
|
||||
open( MYLOG, $LOGTXT );
|
||||
@all_lines = <MYLOG>;
|
||||
close( MYLOG );
|
||||
|
||||
my $line;
|
||||
foreach $line ( sort @all_lines ) {
|
||||
# avoid linebreaks
|
||||
chop $line;
|
||||
# assuming that all lines are kind'of 'aaa=bbb'
|
||||
($class, $status) = split /=/, $line;
|
||||
|
||||
print LOGHTML "<tr><td>",$class,"</td><td>",$status,"</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct Output HTML file Footer
|
||||
#
|
||||
#########################################################################
|
||||
sub constructHTMLFooter() {
|
||||
print LOGHTML "</table></body></html>\n";
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct Output HTML file indicating status of each run
|
||||
#
|
||||
#########################################################################
|
||||
sub constructHTML() {
|
||||
constructHTMLHeader;
|
||||
constructHTMLBody;
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct LogFile Header. The Log file is always appended with entries
|
||||
#
|
||||
#########################################################################
|
||||
sub constructLogHeader() {
|
||||
print LOGFILE "\n";
|
||||
print LOGFILE "\n";
|
||||
print LOGFILE $delimiter;
|
||||
$date = localtime;
|
||||
print LOGFILE "Logging Test Run on $date ...\n";
|
||||
print LOGFILE $delimiter;
|
||||
print LOGFILE "\n";
|
||||
|
||||
print "All Log Entries are maintained in LogFile $LOGFILE\n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct LogFile Footer.
|
||||
#
|
||||
#########################################################################
|
||||
sub constructLogFooter() {
|
||||
print "\n";
|
||||
print LOGFILE $delimiter;
|
||||
$date = localtime;
|
||||
print LOGFILE "End of Logging Test $date ...\n";
|
||||
print LOGFILE $delimiter;
|
||||
print "\n";
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Construct Log String
|
||||
#
|
||||
########################################################################
|
||||
sub constructLogString {
|
||||
my $logstring = shift(@_);
|
||||
print LOGFILE "$logstring\n";
|
||||
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Safely append to file : open, append, close.
|
||||
#
|
||||
########################################################################
|
||||
sub safeAppend {
|
||||
my $file = shift(@_);
|
||||
my $line = shift(@_);
|
||||
open (FILE, ">>$file") or die ("Cann't open $file");
|
||||
print FILE $line;
|
||||
close FILE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
##################################################################
|
||||
# main
|
||||
##################################################################
|
||||
title;
|
||||
|
||||
$curdir = cwd();
|
||||
|
||||
# Prepare file names
|
||||
$LOGFILE = "$curdir/log/BWTestRun.log";
|
||||
$LOGTXT = "$curdir/log/BWTest.txt";
|
||||
$LOGHTML = "$curdir/log/BWTest.html";
|
||||
|
||||
# process command-line parameters
|
||||
# and check for valid usage
|
||||
|
||||
$testparam = "";
|
||||
|
||||
if ( $#ARGV > 1 ) {
|
||||
usage;
|
||||
die;
|
||||
}
|
||||
|
||||
if ( $#ARGV > 0 ) {
|
||||
if ( $ARGV[0] != "-t" ) {
|
||||
usage;
|
||||
die;
|
||||
} else {
|
||||
$testparam = $ARGV[1];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $testparam eq "" ) {
|
||||
print "WARNING: Your are going to execute the whole test suite....\n";
|
||||
checkRun;
|
||||
}
|
||||
|
||||
$mozhome = @ENV{"MOZILLA_FIVE_HOME"};
|
||||
if ( $mozhome eq "" ) {
|
||||
print "MOZILLA_FIVE_HOME is not set. Please set it and rerun this script....\n";
|
||||
die;
|
||||
}
|
||||
|
||||
$mozilla_bin=@ENV{"MOZILLA_BIN"};
|
||||
|
||||
if ( ! -f "$mozhome/$mozilla_bin" ) {
|
||||
print "Could not find $mozilla_bin in MOZILLA_FIVE_HOME ($mozhome).\n";
|
||||
print "Please check your setting...\n";
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
if ( ! -d $TESTROOT) {
|
||||
print "TEST_PATH directory doesn't exist ($TESTROOT)\n";
|
||||
print "Please check your setting...\n";
|
||||
die;
|
||||
}
|
||||
# Here must come a piece of code, that determinates
|
||||
# mozilla instance, removes core, but there's no
|
||||
# core under win32
|
||||
|
||||
# Backup existing .lst file
|
||||
if ( -f "$curdir/BWTestClass.lst" ) {
|
||||
rename "$curdir/BWTestClass.lst", "$curdir/BWTestClass.lst.bak";
|
||||
}
|
||||
|
||||
# Check if ORIG list file is present
|
||||
# this file contains all test cases
|
||||
if ( ! -f "$curdir/BWTestClass.lst.ORIG" ) {
|
||||
print "\n";
|
||||
print "File BWTestClass.lst.ORIG not found ...\n";
|
||||
print "Check Mozilla Source base and bringover this file....\n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
$id=$$;
|
||||
# Check if BWProperties file exists
|
||||
#
|
||||
if ( -f "$mozhome/BWProperties" ) {
|
||||
$newfile="$mozhome/BWProperties.$id";
|
||||
rename "$mozhome/BWProperties", $newfile;
|
||||
}
|
||||
copy "$curdir/BWProperties", "$mozhome/BWProperties";
|
||||
|
||||
# check if output text file of previous run exists.
|
||||
# if so, then save it as .bak
|
||||
#
|
||||
if ( -f "$LOGTXT" ) {
|
||||
$newfile="$LOGTXT.bak";
|
||||
rename $LOGTXT, $newfile;
|
||||
}
|
||||
|
||||
# check if output html file of previous run exists.
|
||||
# if so, then save it as .bak
|
||||
#
|
||||
if ( -f "$LOGHTML" ) {
|
||||
$newfile="$LOGHTML.bak";
|
||||
rename $LOGHTML, $newfile;
|
||||
}
|
||||
|
||||
# construct DOCFILE
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
}
|
||||
$runcnt = 1;
|
||||
$filename = "$curdir/BWTestClass.lst.ORIG";
|
||||
|
||||
if ($runtype == 1) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.html.ORIG";
|
||||
$runcnt = 1;
|
||||
}
|
||||
|
||||
if ($runtype == 2) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderXML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirectxml.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.xml.ORIG";
|
||||
$runcnt = 1;
|
||||
}
|
||||
|
||||
if ($runtype == 3) {
|
||||
if (@ENV{"USE_APPLET_FOR_REGISTRATION"}) {
|
||||
$DOCFILE = "$DOCROOT/TestLoaderHTML.html";
|
||||
} else {
|
||||
$DOCFILE = "$DOCROOT/redirect.html";
|
||||
}
|
||||
$filename = "$curdir/BWTestClass.lst.html.ORIG";
|
||||
$runcnt = 2;
|
||||
}
|
||||
|
||||
# Prepare log streams
|
||||
open( LOGFILE, ">>$LOGFILE" ) or die("Can't open LOG file ($LOGFILE)...\n");
|
||||
select LOGFILE; $| = 1; select STDOUT;
|
||||
open( LOGHTML, ">$LOGHTML" ) or die("Can't open HTML file...\n");
|
||||
|
||||
print "Runtype is $runtype \n";
|
||||
constructLogHeader();
|
||||
|
||||
$ENV{"CLASSPATH"} = "$curdir/../classes".$path_separator.$ENV{"CLASSPATH"};
|
||||
|
||||
$LST_OUT = "$curdir/BWTestClass.lst";
|
||||
|
||||
|
||||
$currcnt = 0;
|
||||
while (true) {
|
||||
open( file, $filename ) or die("Can't open $filename...\n");
|
||||
while( $line = <file> ) {
|
||||
chop $line;
|
||||
if ( $testparam ne "" ) {
|
||||
$testcase = $testparam;
|
||||
} else {
|
||||
$testcase = $line;
|
||||
}
|
||||
|
||||
if ( $testcase =~ /^\s*#/ ) {
|
||||
next;
|
||||
}
|
||||
|
||||
open(LST_OUT, ">$LST_OUT") or die ("Can't open LST_OUT file...\n");
|
||||
print LST_OUT $testcase;
|
||||
close(LST_OUT);
|
||||
|
||||
chdir( $mozhome );
|
||||
print "========================================\n";
|
||||
$logstr="Running TestCase $testcase....";
|
||||
print "$logstr\n";
|
||||
constructLogString "$logstr";
|
||||
|
||||
($nom) = ($testcase =~ /([^\.]*)$/);
|
||||
$testlog = "$curdir/log/$nom.$id.log";
|
||||
|
||||
print("Loading $DOCFILE ...\n");
|
||||
open( SAVEOUT, ">&STDOUT" );
|
||||
open( SAVEERR, ">&STDERR" );
|
||||
open( STDOUT, ">$testlog" ) or die "Can't redirect stdout";
|
||||
open( STDERR, ">&STDOUT" );
|
||||
Win32::Process::Create($ProcessObj,
|
||||
"$mozhome/$mozilla_bin",
|
||||
"$mozhome/$mozilla_bin $ADDITIONAL_PARAMETERS $DOCFILE",
|
||||
1,
|
||||
NORMAL_PRIORITY_CLASS,
|
||||
"$TESTROOT" ) || die "cann't start $moilla_bin";
|
||||
close( STDOUT );
|
||||
close( STDERR );
|
||||
open( STDOUT, ">&SAVEOUT" );
|
||||
open( STDERR, ">&SAVEERR" );
|
||||
|
||||
$flag = 0;
|
||||
$cnt = 0;
|
||||
while (true) {
|
||||
sleep($DELAY_OF_CYCLE);
|
||||
|
||||
$ProcessObj->GetExitCode($exit_code);
|
||||
if ( $exit_code != $STILL_ALIVE ) {
|
||||
|
||||
$logstr = "Test terminated with exit code $exit_code.";
|
||||
constructLogString "$logstr";
|
||||
if ( $exit_code != 0 ) {
|
||||
safeAppend $LOGTXT, "$testcase=FAILED\n";
|
||||
$logstr = "Test FAILED...";
|
||||
constructLogString "$logstr";
|
||||
}
|
||||
$logstr = "Check ErrorLog File $testlog ";
|
||||
constructLogString "$logstr";
|
||||
constructLogString "";
|
||||
constructLogString "";
|
||||
|
||||
$flag = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
$cnt += $DELAY_OF_CYCLE;
|
||||
if ( $cnt >= $DELAY_FACTOR ) {
|
||||
$flag = 0;
|
||||
$ProcessObj->Kill(0);
|
||||
last;
|
||||
}
|
||||
} # while with sleep
|
||||
|
||||
( $testparam eq "" ) || last;
|
||||
|
||||
} # while ( $line
|
||||
|
||||
( ++$currcnt < $runcnt ) || last;
|
||||
|
||||
if ( $runtype == 3 ) {
|
||||
$DOCFILE="$DOCROOT/redirectxml.html";
|
||||
$filename="$curdir/BWTestClass.lst.xml.ORIG";
|
||||
constructHTML;
|
||||
appendEntries;
|
||||
if ( -f "$LOGTXT" ) {
|
||||
$newfile = "$LOGTXT.bak";
|
||||
rename ($LOGTXT, $newfile) or die( "Cann't clear LOGTXT..." ) ;
|
||||
}
|
||||
}
|
||||
|
||||
} # while(true)
|
||||
|
||||
constructLogFooter;
|
||||
if ( $runtype == 3 ) {
|
||||
constructHTMLBody;
|
||||
} else {
|
||||
constructHTML;
|
||||
}
|
||||
constructHTMLFooter;
|
||||
|
||||
$newfile="$mozhome/BWProperties.$id";
|
||||
rename "$newfile", "$mozhome/BWProperties";
|
||||
chdir($curdir);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
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%\classes;%MOZILLA_FIVE_HOME%\..\classes;%CLASSPATH%
|
||||
|
||||
|
||||
rem creating new console window with these variables being set
|
||||
start
|
|
@ -1,17 +0,0 @@
|
|||
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 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}
|
0
java/plugins/examples/MediaPlayer/Makefile → java/dom/tests/src/newsrc/DOMViewerFactory.java
Normal file → Executable file
0
java/plugins/examples/MediaPlayer/Makefile → java/dom/tests/src/newsrc/DOMViewerFactory.java
Normal file → Executable file
0
java/plugins/examples/dom/Makefile → java/dom/tests/src/newsrc/Makefile
Normal file → Executable file
0
java/plugins/examples/dom/Makefile → java/dom/tests/src/newsrc/Makefile
Normal file → Executable file
0
java/plugins/examples/dom/test.html → java/dom/tests/src/newsrc/Makefile.solaris
Normal file → Executable file
0
java/plugins/examples/dom/test.html → java/dom/tests/src/newsrc/Makefile.solaris
Normal file → Executable file
0
java/plugins/examples/pdf/Makefile → java/dom/tests/src/newsrc/Makefile.win
Normal file → Executable file
0
java/plugins/examples/pdf/Makefile → java/dom/tests/src/newsrc/Makefile.win
Normal file → Executable file
0
java/plugins/examples/rtf/Makefile → java/dom/tests/src/newsrc/README
Normal file → Executable file
0
java/plugins/examples/rtf/Makefile → java/dom/tests/src/newsrc/README
Normal file → Executable file
0
java/plugins/examples/rtf/view.html → java/dom/tests/src/newsrc/manifest
Normal file → Executable file
0
java/plugins/examples/rtf/view.html → java/dom/tests/src/newsrc/manifest
Normal file → Executable file
|
@ -1,5 +0,0 @@
|
|||
<html>
|
||||
<body name="hello_body" id="body_tag_id" bgcolor="blue">
|
||||
Hello
|
||||
</body>
|
||||
</html>
|
|
@ -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.
|
||||
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,34 +0,0 @@
|
|||
#!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 = ../..
|
||||
VPATH = .
|
||||
srcdir = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS= \
|
||||
src \
|
||||
jni \
|
||||
classes \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -1,34 +0,0 @@
|
|||
#!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= \
|
||||
src \
|
||||
jni \
|
||||
classes \
|
||||
$(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();
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
|
@ -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=JMPlayer
|
||||
CLASSES=JMPlayer.class
|
||||
|
||||
include ../../config/rules.mk
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# 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= ../../../..
|
||||
|
||||
HTML=index.html
|
||||
|
||||
include ../../config/rules.mk
|
||||
|
||||
export:
|
||||
cp pluglet_run.sh $(DEPTH)/bin
|
|
@ -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>
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
LD_PRELOAD=libXm.so
|
||||
export LD_PRELOAD
|
||||
./mozilla resource:///res/javadev/pluglets/index.html
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# 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=DOMViewer
|
||||
CLASSES=DOMViewerFactory.class DOMAccessPanel.class DOMTreeDumper.class
|
||||
HTML=dom.html
|
||||
|
||||
include ../../config/rules.mk
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
DOM demo document
|
||||
</title>
|
||||
</head>
|
||||
<body some_Attr="some_value" bgcolor="#FFFFFF" text="#000000" link="#FFFFFF">
|
||||
<EMBED type="application/dom-viewer" width=0 height=0>
|
||||
Hello
|
||||
<a href="t.html"> t.html </a>
|
||||
After
|
||||
|
||||
<!-- it's a comment -->
|
||||
|
||||
<FORM>
|
||||
<table width=300>
|
||||
<tr>
|
||||
<td width=75>
|
||||
cell 1
|
||||
<td width=100>
|
||||
cell 2
|
||||
<td>
|
||||
cell 3
|
||||
<tr>
|
||||
<td width=75>
|
||||
cell a1
|
||||
<td width=100>
|
||||
<INPUT TYPE=HIDDEN NAME="input_str" VALUE="cell a2">
|
||||
<td>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -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=PDFView.jar
|
||||
CLASSES=PDFView.class
|
||||
|
||||
include ../../config/rules.mk
|
|
@ -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
|
|
@ -0,0 +1,5 @@
|
|||
<html>
|
||||
<body>
|
||||
<EMBED type="application/rtf" name=JView SRC="Readme.rtf" width=400 height=500>
|
||||
</body>
|
||||
</html>
|
|
@ -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];
|
||||
|
|
|
@ -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 $");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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 RaptorCanvas.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Kirk Baker and
|
||||
* Ian Wilkinson. Portions created by Kirk Baker and Ian Wilkinson are
|
||||
* Copyright (C) 1999 Kirk Baker and Ian Wilkinson. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Kirk Baker <kbaker@eb.com>
|
||||
* Ian Wilkinson <iw@ennoble.com>
|
||||
* Mark Lin <mark.lin@eng.sun.com>
|
||||
* Mark Goddard
|
||||
* Ed Burns <edburns@acm.org>
|
||||
* Ann Sunhachawee
|
||||
*/
|
||||
|
||||
package org.mozilla.webclient.wrapper_native;
|
||||
|
||||
// ImplObjectNative.java
|
||||
|
||||
import org.mozilla.util.Assert;
|
||||
import org.mozilla.util.Log;
|
||||
import org.mozilla.util.ParameterCheck;
|
||||
|
||||
import org.mozilla.webclient.ImplObject;
|
||||
import org.mozilla.webclient.WrapperFactory;
|
||||
import org.mozilla.webclient.BrowserControl;
|
||||
import org.mozilla.webclient.WindowControl;
|
||||
|
||||
/**
|
||||
|
||||
* This is the base class for all implementations of the BrowserControl
|
||||
* interfaces in the native browser wrapping code. It simply defines
|
||||
* the common attributes for all native browser wrapping webclient
|
||||
* implementation classes. It extends the ImplObject, which is the base
|
||||
* class for all implementations of BrowserControl interfaces in either
|
||||
* native or non-native code.
|
||||
|
||||
*/
|
||||
|
||||
public abstract class ImplObjectNative extends ImplObject
|
||||
{
|
||||
//
|
||||
// Protected Constants
|
||||
//
|
||||
|
||||
//
|
||||
// Class Variables
|
||||
//
|
||||
|
||||
//
|
||||
// Instance Variables
|
||||
//
|
||||
|
||||
// Attribute Instance Variables
|
||||
|
||||
// Relationship Instance Variables
|
||||
|
||||
/**
|
||||
|
||||
* My ivars are public for fast access from subclasses in the wrapper_*
|
||||
* packages.
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* a handle to the actual mozilla webShell, owned, allocated, and
|
||||
* released by WindowControl
|
||||
|
||||
*/
|
||||
|
||||
public int nativeWebShell = -1;
|
||||
|
||||
//
|
||||
// Constructors and Initializers
|
||||
//
|
||||
|
||||
public ImplObjectNative(WrapperFactory yourFactory,
|
||||
BrowserControl yourBrowserControl)
|
||||
{
|
||||
super(yourFactory, yourBrowserControl);
|
||||
|
||||
// If we're a WindowControlImpl instance, we can't ask ourself for
|
||||
// the nativeWebShell, since it hasn't yet been created!
|
||||
|
||||
if (!(this instanceof WindowControlImpl)) {
|
||||
// save the native webshell ptr
|
||||
try {
|
||||
WindowControl windowControl = (WindowControl)
|
||||
myBrowserControl.queryInterface(BrowserControl.WINDOW_CONTROL_NAME);
|
||||
nativeWebShell = windowControl.getNativeWebShell();
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* This constructor doesn't initialize the nativeWebshell ivar
|
||||
|
||||
*/
|
||||
|
||||
public ImplObjectNative(WrapperFactory yourFactory,
|
||||
BrowserControl yourBrowserControl,
|
||||
boolean notUsed)
|
||||
{
|
||||
super(yourFactory, yourBrowserControl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Note how we call super.delete() at the end. THIS IS VERY IMPORTANT. <P>
|
||||
|
||||
* Also, note how we don't de-allocate nativeWebShell, that is done in
|
||||
* the class that owns the nativeWebShell reference, WindowControlImpl. <P>
|
||||
|
||||
* ImplObjectNative subclasses that further override delete() are <P>
|
||||
|
||||
<CODE><PRE>
|
||||
BookmarksImpl.java
|
||||
EventRegistrationImpl.java
|
||||
NativeEventThread.java
|
||||
WindowControlImpl.java
|
||||
</PRE><CODE> <P>
|
||||
|
||||
* All other ImplObject subclasses don't have any local Ivars and thus
|
||||
* don't need to override delete().
|
||||
|
||||
*/
|
||||
|
||||
public void delete()
|
||||
{
|
||||
nativeWebShell = -1;
|
||||
System.out.println("debug: edburns: ImplObjectNative.delete()");
|
||||
super.delete();
|
||||
}
|
||||
|
||||
|
||||
} // end of class ImplObject
|
|
@ -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;
|
||||
|
|
|
@ -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
|
Загрузка…
Ссылка в новой задаче