*not part of the build*

fix for 80938
a = avm@sparc.spb.su
    ovk@sparc.spb.su
    sva@sparc.spb.su

Tests for blackConnect


git-svn-id: svn://10.0.0.236/trunk@95860 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2001-05-24 05:22:13 +00:00
parent d74ff774aa
commit 6e4a0fdecc
214 changed files with 17250 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
a3532005-66d4-4988-8067-dd1928c60138
component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent1

View File

@@ -0,0 +1,114 @@
/* -*- Mode: Java; 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 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):
Client QA Team, St. Petersburg, Russia
*/
import org.mozilla.xpcom.*;
import java.lang.reflect.*;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
public class MThreadComponent1 implements iMThreadComponent1, iMThreadComponent {
private iMThreadContext context = null;
public MThreadComponent1() {
System.out.println("DEbug:avm:MThreadComponent1 constructor");
}
public void initialize(iMThreadContext context) {
System.out.println("DEbug:avm:MThreadComponent1:initialize Thread is " + Thread.currentThread().getName());
this.context = context;
}
public iMThreadComponent loadComponent(CID classID) {
System.out.println("DEbug:avm:MThreadComponent1:loadComponent");
nsIComponentManager cm = context.getComponentManager();
nsIFactory factory = cm.findFactory(classID);
if(factory == null) {
System.out.println("DEbug:avm:Factory is NULL!!!!!");
return null;
}
iMThreadComponent component = (iMThreadComponent)factory.createInstance(null, iMThreadComponent.IID);
return component;
}
/* void Execute (); */
public void execute(String tName) {
System.out.println("DEbug:avm:MThreadComponent1:execute.");
String cThreadName = Thread.currentThread().getName();
if(tName.equals(cThreadName)) {
System.out.println("PASSED: original and expected names equals to " + tName);
} else {
System.out.println("FAILED: Current thread name is " + cThreadName + " instead of " + tName );
}
CID classID = new CID(context.getNext());
iMThreadComponent component = loadComponent(classID);
if(component == null) {
System.out.println("Can't load component");
return;
}
System.out.println("Initialize of " + component + " called in thread " + cThreadName);
component.initialize(context);
(new ExecutionThread(component)).run();
//component.execute();
}
public Object queryInterface(IID iid) {
System.out.println("DEbug:avm:MThreadComponent1::queryInterface iid="+iid);
if ( iid.equals(nsISupports.IID)
|| iid.equals(iMThreadComponent1.IID)||iid.equals(iMThreadComponent.IID)) {
return this;
} else {
return null;
}
}
static CID J2XINServerCID = new CID("1ddc5b10-9852-11d4-aa22-00a024a8bbac");
static {
try {
Class nsIComponentManagerClass =
Class.forName("org.mozilla.xpcom.nsIComponentManager");
InterfaceRegistry.register(nsIComponentManagerClass);
Class iMThreadComponentClass =
Class.forName("org.mozilla.xpcom.iMThreadComponent");
InterfaceRegistry.register(iMThreadComponentClass);
Class iMThreadContextClass =
Class.forName("org.mozilla.xpcom.iMThreadContext");
InterfaceRegistry.register(iMThreadContextClass);
Class nsIFactoryClass =
Class.forName("org.mozilla.xpcom.nsIFactory");
InterfaceRegistry.register(nsIFactoryClass);
} catch (Exception e) {
e.printStackTrace();
} catch (Error e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,55 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
JAVA_OR_NSJVM=1
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
JAVA_SRC = \
MThreadComponent1.java
JAVAI_SRC = \
iMThreadComponent1.java
MThreadComponent1.jar.comp: manifest MThreadComponent1.class
$(JDKHOME)/bin/jar cvfm MThreadComponent1.jar.comp manifest *.class
MThreadComponent1.class:
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
export::
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
install-component: MThreadComponent1.jar.comp MThreadComponent1.jar.info
cp -f MThreadComponent1.jar* $(DIST)/bin/components
clobber::
rm -f *.class *.jar.comp
rm -f $(DIST)/bin/components/MThreadComponent1.jar.*
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1,47 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
[scriptable, uuid(542a9e2e-b5f0-4381-8643-b758571f2b58)]
interface iMThreadComponent1 : nsISupports
{
};
%{ C++
#define MTHREADCOMPONENT1_CID \
{ /* a3532005-66d4-4988-8067-dd1928c60138 */ \
0xa3532005, \
0x66d4, \
0x4988, \
{0x80, 0x67, 0xdd, 0x19, 0x28, 0xc6, 0x01, 0x38} \
}
#define MTHREADCOMPONENT1_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent1"
%}

View File

@@ -0,0 +1,27 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMThreadComponent1.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMThreadComponent1
*
* IID: 0x542a9e2e-b5f0-4381-8643-b758571f2b58
*/
public interface iMThreadComponent1 extends nsISupports
{
public static final IID IID =
new IID("542a9e2e-b5f0-4381-8643-b758571f2b58");
}
/*
* end
*/

View File

@@ -0,0 +1,53 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
JAVA_OR_NSJVM=1
include <$(topsrcdir)\config\rules.mak>
JAVA_SRC = \
MThreadComponent1.java
JAVAI_SRC = \
iMThreadComponent1.java
MThreadComponent1.jar.comp: manifest MThreadComponent1.class
$(JDKHOME)\bin\jar cvfm MThreadComponent1.jar.comp manifest *.class
MThreadComponent1.class:
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes $(JAVA_SRC)
export::
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
install-component: MThreadComponent1.jar.comp MThreadComponent1.jar.info
copy MThreadComponent1.jar* $(DIST)\bin\components
clobber::
del /f *.class *.jar.comp
del /f $(DIST)\bin\components\MThreadComponent1.jar.*
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMThreadComponent1.class
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1 @@
Component-Class: MThreadComponent1

View File

@@ -0,0 +1,330 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from /export2/avm/PR3/mozilla/dist/bin/../idl/nsIComponentManager.idl.
*/
package org.mozilla.xpcom;
/**
* Interface nsIComponentManager
*
* IID: 0x8458a740-d5dc-11d2-92fb-00e09805570f
*/
public interface nsIComponentManager extends nsISupports
{
public static final String IID =
"8458a740-d5dc-11d2-92fb-00e09805570f";
/**
* findFactory
*
* Returns the factory object that can be used to create instances of
* CID aClass
*
* @param aClass The classid of the factory that is being requested
*/
/* nsIFactory findFactory (in nsCIDRef aClass); */
public nsIFactory findFactory(IID aClass);
/**
* getClassObject
*
* @param aClass : CID of the class whose class object is requested
* @param aIID : IID of an interface that the class object is known to
* to implement. nsISupports and nsIFactory are known to
* be implemented by the class object.
*/
/**
* contractIDToClassID
*
* Get the ClassID for a given ContractID. Many ClassIDs may implement a
* ContractID. In such a situation, this returns the preferred ClassID, which
* happens to be the last registered ClassID.
*
* @param aContractID : Contractid for which ClassID is requested
* @return aClass : ClassID return
*/
/**
* classIDToContractid
*
* Get the ContractID for a given ClassID. A ClassIDs may implement multiple
* ContractIDs. This function return the last registered ContractID.
*
* @param aClass : ClassID for which ContractID is requested.
* @return aClassName : returns class name asssociated with aClass
* @return : ContractID last registered for aClass
*/
/* string CLSIDToContractID (in nsCIDRef aClass, out string aClassName); */
public String cLSIDToContractID(IID aClass, String[] aClassName);
/**
* createInstance
*
* Create an instance of the CID aClass and return the interface aIID.
*
* @param aClass : ClassID of object instance requested
* @param aDelegate : Used for aggregation
* @param aIID : IID of interface requested
*/
/**
* createInstanceByContractID
*
* Create an instance of the CID that implements aContractID and return the
* interface aIID. This is a convenience function that effectively does
* ContractIDToClassID() followed by CreateInstance().
*
* @param aContractID : aContractID of object instance requested
* @param aDelegate : Used for aggregation
* @param aIID : IID of interface requested
*/
/**
* registryLocationForSpec
*
* Given a file specification, return the registry representation of
* the filename. Files that are found relative to the components
* directory will have a registry representation
* "rel:<relative-native-path>" while filenames that are not, will have
* "abs:<full-native-path>".
*/
/* string registryLocationForSpec (in nsIFile aSpec); */
public String registryLocationForSpec(nsIFile aSpec);
/**
* specForRegistyLocation
*
* Create a file specification for the registry representation (rel:/abs:)
* got via registryLocationForSpec.
*/
/* nsIFile specForRegistryLocation (in string aLocation); */
public nsIFile specForRegistryLocation(String aLocation);
/**
* registerFactory
*
* Register a factory and ContractID associated with CID aClass
*
* @param aClass : CID of object
* @param aClassName : Class Name of CID
* @param aContractID : ContractID associated with CID aClass
* @param aFactory : Factory that will be registered for CID aClass
* @param aReplace : Boolean that indicates whether to replace a previous
* registration for the CID aClass.
*/
/* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory, in boolean aReplace); */
public void registerFactory(IID aClass, String aClassName, String aContractID, nsIFactory aFactory, boolean aReplace);
/**
* registerComponent
*
* Register a native dll module via its registry representation as returned
* by registryLocationForSpec() as the container of CID implemenation
* aClass and associate aContractID and aClassName to the CID aClass. Native
* dll component type is assumed.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aLocation : Location of module (dll). Format of this is the
* registry representation as returned by
* registryLocationForSpec()
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponent (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */
public void registerComponent(IID aClass, String aClassName, String aContractID, String aLocation, boolean aReplace, boolean aPersist);
/**
* registerComponentWithType
*
* Register a module's location via its registry representation
* as returned by registryLocationForSpec() as the container of CID implemenation
* aClass of type aType and associate aContractID and aClassName to the CID aClass.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aSpec : Filename spec for module's location.
* @param aLocation : Location of module of type aType. Format of this string
* is the registry representation as returned by
* registryLocationForSpec()
* @param aReplace : Boolean that indicates whether to replace a previous
* loader registration for aClass.
* @param aPersist : Remember this registration across sessions.
* @param aType : Component Type of CID aClass.
*/
/* void registerComponentWithType (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aSpec, in string aLocation, in boolean aReplace, in boolean aPersist, in string aType); */
public void registerComponentWithType(IID aClass, String aClassName, String aContractID, nsIFile aSpec, String aLocation, boolean aReplace, boolean aPersist, String aType);
/**
* registerComponentSpec
*
* Register a native dll module via its file specification as the container
* of CID implemenation aClass and associate aContractID and aClassName to the
* CID aClass. Native dll component type is assumed.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aLibrary : File specification Location of module (dll).
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponentSpec (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aLibrary, in boolean aReplace, in boolean aPersist); */
public void registerComponentSpec(IID aClass, String aClassName, String aContractID, nsIFile aLibrary, boolean aReplace, boolean aPersist);
/**
* registerComponentLib
*
* Register a native dll module via its dll name (not full path) as the
* container of CID implemenation aClass and associate aContractID and aClassName
* to the CID aClass. Native dll component type is assumed and the system
* services will be used to load this dll.
*
* @param aClass : CID implemenation contained in module
* @param aClassName : Class name associated with CID aClass
* @param aContractID : ContractID associated with CID aClass
* @param aDllNameLocation : Dll name of module.
* @param aReplace : Boolean that indicates whether to replace a previous
* module registration for aClass.
* @param aPersist : Remember this registration across sessions.
*/
/* void registerComponentLib (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aDllName, in boolean aReplace, in boolean aPersist); */
public void registerComponentLib(IID aClass, String aClassName, String aContractID, String aDllName, boolean aReplace, boolean aPersist);
/**
* unregisterFactory
*
* Unregister a factory associated with CID aClass.
*
* @param aClass : ClassID being unregistered
* @param aFactory : Factory previously registered to create instances of
* ClassID aClass.
*/
/* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */
public void unregisterFactory(IID aClass, nsIFactory aFactory);
/**
* unregisterComponent
*
* Disassociate module aLocation represented as registry location as returned
* by registryLocationForSpec() as containing ClassID aClass.
*
* @param aClass : ClassID being unregistered
* @param aLocation : Location of module. Format of this is the registry
* representation as returned by registryLocationForSpec().
* Components of any type will be unregistered.
*/
/* void unregisterComponent (in nsCIDRef aClass, in string aLocation); */
public void unregisterComponent(IID aClass, String aLocation);
/**
* unregisterComponentSpec
*
* Disassociate module references by file specification aLibrarySpec as
* containing ClassID aClass.
*/
/* void unregisterComponentSpec (in nsCIDRef aClass, in nsIFile aLibrarySpec); */
public void unregisterComponentSpec(IID aClass, nsIFile aLibrarySpec);
/**
* freeLibraries
*
* Enumerates all loaded modules and unloads unused modules.
*/
/* void freeLibraries (); */
public void freeLibraries();
/**
* ID values for 'when'
*/
/* const long NS_Startup = 0; */
public static final int NS_Startup = 0;
/* const long NS_Script = 1; */
public static final int NS_Script = 1;
/* const long NS_Timer = 2; */
public static final int NS_Timer = 2;
/* const long NS_Shutdown = 3; */
public static final int NS_Shutdown = 3;
/**
* autoRegister
*
* Enumerates directory looking for modules of all types and registers
* modules who have changed (modtime or size) since the last time
* autoRegister() was invoked.
*
* @param when : ID values of when the call is being made.
* @param directory : Directory the will be enumerated.
*/
/* void autoRegister (in long when, in nsIFile directory); */
public void autoRegister(int when, nsIFile directory);
/**
* autoRegisterComponent
*
* Loads module using appropriate loader and gives it an opportunity to
* register its CIDs if module's modtime or size changed since the last
* time this was called.
*
* @param when : ID values of when the call is being made.
* @param aFileLocation : File specification of module.
*/
/* void autoRegisterComponent (in long when, in nsIFile aFileLocation); */
public void autoRegisterComponent(int when, nsIFile aFileLocation);
/**
* autoUnregisterComponent
*
* Loads module using approriate loader and gives it an opportunity to
* unregister its CIDs
*/
/* void autoUnregisterComponent (in long when, in nsIFile aFileLocation); */
public void autoUnregisterComponent(int when, nsIFile aFileLocation);
/**
* isRegistered
*
* Returns true if a factory or module is registered for CID aClass.
*
* @param aClass : ClassID queried for registeration
* @return : true if a factory or module is registered for CID aClass.
* false otherwise.
*/
/* boolean isRegistered (in nsCIDRef aClass); */
public boolean isRegistered(IID aClass);
/**
* enumerateCLSIDs
*
* Enumerate the list of all registered ClassIDs.
*
* @return : enumerator for ClassIDs.
*/
/* nsIEnumerator enumerateCLSIDs (); */
public nsIEnumerator enumerateCLSIDs();
/**
* enumerateContractIDs
*
* Enumerate the list of all registered ContractIDs.
*
* @return : enumerator for ContractIDs.
*/
/* nsIEnumerator enumerateContractIDs (); */
public nsIEnumerator enumerateContractIDs();
}
/*
* end
*/

View File

@@ -0,0 +1,90 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "plstr.h"
#include "stdio.h"
#include "nsIComponentManager.h"
#include "MThreadComponent2.h"
#include "nsMemory.h"
#include "prthread.h"
#include <sys/stat.h>
#include <stdlib.h>
#include "nsID.h"
iMThreadContext* context;
void* iThread;
void* eThread;
MThreadComponent2Impl::MThreadComponent2Impl()
{
NS_INIT_REFCNT();
printf("MThreadComponent2Impl::MThreadComponent2Imp\n");
}
MThreadComponent2Impl::~MThreadComponent2Impl()
{
}
NS_IMPL_ISUPPORTS2(MThreadComponent2Impl, iMThreadComponent2, iMThreadComponent);
NS_IMETHODIMP MThreadComponent2Impl::Initialize(iMThreadContext* c){
context = c;
printf("MThreadComponent2Impl::Initialize\n");
iThread =(void*) PR_GetCurrentThread();
return NS_OK;
}
NS_IMETHODIMP MThreadComponent2Impl::Execute(const char* tName){
printf("MThreadComponent2Impl::Execute. Thread is %s\n", tName);
eThread = PR_GetCurrentThread();
if(eThread == iThread) {
printf("###Execute and initialize were executed in one thread\n");
}else {
printf("###Execute and initialize were executed in DIFFERENT threads\n");
}
char* progID;
context->GetNext(&progID);
nsCID classID;
classID.Parse(progID);
printf("MThreadComponent2Impl::Execute. progID is %s\n",progID);
iMThreadComponent* tComponent;
nsresult rv = nsComponentManager::CreateInstance(classID,
nsnull,
NS_GET_IID(iMThreadComponent),
(void**)&tComponent);
if(NS_FAILED(rv)) {
printf("MThreadComponent2Impl:Create instance failed from %s!!!",classID.ToString());
return rv;
}
tComponent->Initialize(context);
tComponent->Execute(tName);
}

View File

@@ -0,0 +1,39 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "iMThreadComponent2.h"
#include "iMThreadComponent.h"
class MThreadComponent2Impl : public iMThreadComponent2, public iMThreadComponent
{
public:
MThreadComponent2Impl();
virtual ~MThreadComponent2Impl();
NS_DECL_ISUPPORTS
NS_DECL_IMTHREADCOMPONENT2
NS_DECL_IMTHREADCOMPONENT
};

View File

@@ -0,0 +1,46 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsIGenericFactory.h"
#include "MThreadComponent2.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(MThreadComponent2Impl)
static nsModuleComponentInfo components[] =
{
{ "X2JIN Client Test Component", MTHREADCOMPONENT2_CID, MTHREADCOMPONENT2_PROGID, MThreadComponent2ImplConstructor,
NULL /* NULL if you dont need one */,
NULL /* NULL if you dont need one */
}
};
NS_IMPL_NSGETMODULE("MThreadComponent2Factory", components)

View File

@@ -0,0 +1,49 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
include $(DEPTH)/config/autoconf.mk
MODULE = MThreadComponent2
LIBRARY_NAME = $(MODULE)
XPIDL_MODULE = $(MODULE)
IS_COMPONENT = 1
CPPSRCS = \
MThreadComponent2.cpp \
MThreadComponent2Factory.cpp \
$(NULL)
XPIDLSRCS = iMThreadComponent2.idl
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
JAVAI_SRC = iMThreadComponent2.java
include $(topsrcdir)/config/rules.mk
export::
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $(JAVAI_SRC)

View File

@@ -0,0 +1,47 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
[scriptable, uuid(c69e0aac-b0dc-40c9-a0b6-226a842dfa1b)]
interface iMThreadComponent2 : nsISupports
{
};
%{ C++
#define MTHREADCOMPONENT2_CID \
{ /* 2e4ca352-3a8a-412b-b8df-4c28c0686863 */ \
0x2e4ca352, \
0x3a8a, \
0x412b, \
{0xb8, 0xdf, 0x4c, 0x28, 0xc0, 0x68, 0x68, 0x63} \
}
#define MTHREADCOMPONENT2_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent2"
%}

View File

@@ -0,0 +1,27 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMThreadComponent2.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMThreadComponent2
*
* IID: 0xc69e0aac-b0dc-40c9-a0b6-226a842dfa1b
*/
public interface iMThreadComponent2 extends nsISupports
{
public static final IID IID =
new IID("c69e0aac-b0dc-40c9-a0b6-226a842dfa1b");
}
/*
* end
*/

View File

@@ -0,0 +1,58 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
MODULE = MThreadComponent2
MAKE_OBJ_TYPE = DLL
DLLNAME = $(MODULE)
DLL =.\$(OBJDIR)\$(DLLNAME).dll
COMPONENT = 1
CPP_OBJS = \
.\$(OBJDIR)\MThreadComponent2.obj \
.\$(OBJDIR)\MThreadComponent2Factory.obj \
$(NULL)
XPIDLSRCS = \
.\iMThreadComponent2.idl \
$(NULL)
JAVAI = iMThreadComponent2.java
LLIBS =$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
include <$(topsrcdir)\config\rules.mak>
javai:
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI)
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI)
install:: $(DLL) javai
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
clobber::
del /f $(DIST)\bin\components\$(DLLNAME).dll
del /f $(DIST)\bin\components\$(DLLNAME).xpt
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMThreadComponent2.class

View File

@@ -0,0 +1,2 @@
14aac93e-d49c-4b03-a384-12e8ca9c310a
component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent3

View File

@@ -0,0 +1,136 @@
/* -*- Mode: Java; 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 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):
Client QA Team, St. Petersburg, Russia
*/
import org.mozilla.xpcom.*;
import java.lang.reflect.*;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
public class MThreadComponent3 implements iMThreadComponent3, iMThreadComponent {
private iMThreadContext context = null;
public MThreadComponent3() {
System.out.println("DEbug:avm:MThreadComponent3 constructor");
}
public void initialize(iMThreadContext context) {
System.out.println("DEbug:avm:MThreadComponent3:initialize Thread is " + Thread.currentThread().getName());
this.context = context;
}
/*
public void tHack(nsIComponentManager cm, String serverProgID) {
System.out.println("DEbug:avm:MThreadComponent3:tHack");
nsIFactory factory = null;
if(cm == null) {
System.out.println("DEbug:avm:ComponentManager is NULL!!!!!");
return;
}
factory = cm.findFactory(J2XINServerCID);
if(factory == null) {
System.out.println("DEbug:avm:Factory is NULL!!!!!");
return;
}
Object res = factory.createInstance(null, iJ2XINServerIID);
if(res == null) {
System.out.println("DEbug:avm:Instance is NULL!!!!!");
return;
}
server = (iJ2XINServerTestComponent)res;
if(server == null) {
System.err.println("Create instance failed!! Server is NULLLLLLLLLLLLLLLLLLL");
return;
}
String[] s = new String[1];
String[] s1 = new String[1];
server.getTestLocation(s,s1);
testLocation = s[0];
logLocation = s1[0];
}
*/
/* void Execute (); */
public void execute(String tName) {
System.out.println("DEbug:avm:MThreadComponent3:execute");
String cThreadName = Thread.currentThread().getName();
if(tName.equals(cThreadName)) {
System.out.println("PASSED: original and expected names equals to " + tName);
} else {
System.out.println("FAILED: Current thread name is " + cThreadName + " instead of " + tName );
}
CID classID = new CID(context.getNext());
iMThreadComponent component = loadComponent(classID);
if(component == null) {
System.out.println("Can't load component");
return;
}
component.initialize(context);
(new ExecutionThread(component)).run();
}
public iMThreadComponent loadComponent(CID classID) {
System.out.println("DEbug:avm:MThreadComponent1:loadComponent");
nsIComponentManager cm = context.getComponentManager();
nsIFactory factory = cm.findFactory(classID);
if(factory == null) {
System.out.println("DEbug:avm:Factory is NULL!!!!!");
return null;
}
iMThreadComponent component = (iMThreadComponent)factory.createInstance(null, iMThreadComponent.IID);
return component;
}
public Object queryInterface(IID iid) {
System.out.println("DEbug:avm:MThreadComponent3::queryInterface iid="+iid);
if ( iid.equals(nsISupports.IID)
|| iid.equals(iMThreadComponent3.IID)||iid.equals(iMThreadComponent.IID)) {
return this;
} else {
return null;
}
}
static CID J2XINServerCID = new CID("1ddc5b10-9852-11d4-aa22-00a024a8bbac");
static {
try {
Class nsIComponentManagerClass =
Class.forName("org.mozilla.xpcom.nsIComponentManager");
InterfaceRegistry.register(nsIComponentManagerClass);
} catch (Exception e) {
e.printStackTrace();
} catch (Error e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,55 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
JAVA_OR_NSJVM=1
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
JAVA_SRC = \
MThreadComponent3.java
JAVAI_SRC = \
iMThreadComponent3.java
MThreadComponent3.jar.comp: manifest MThreadComponent3.class
$(JDKHOME)/bin/jar cvfm MThreadComponent3.jar.comp manifest *.class
MThreadComponent3.class:
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
export::
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
install-component: MThreadComponent3.jar.comp MThreadComponent3.jar.info
cp -f MThreadComponent3.jar* $(DIST)/bin/components
clobber::
rm -f *.class *.jar.comp
rm -f $(DIST)/bin/components/MThreadComponent3.jar.*
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1,48 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
[scriptable, uuid(e9a4aa5a-5a7b-4671-b7df-d5cadc54d485)]
interface iMThreadComponent3 : nsISupports
{
};
%{ C++
#define MTHREADCOMPONENT1_CID \
{ /* 14aac93e-d49c-4b03-a384-12e8ca9c310a */ \
0x14aac93e, \
0xd49c, \
0x4b03, \
{0xa3, 0x84, 0x12, 0xe8, 0xca, 0x9c, 0x31, 0x0a} \
}
#define MTHREADCOMPONENT3_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent3"
%}

View File

@@ -0,0 +1,27 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMThreadComponent3.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMThreadComponent3
*
* IID: 0xe9a4aa5a-5a7b-4671-b7df-d5cadc54d485
*/
public interface iMThreadComponent3 extends nsISupports
{
public static final IID IID =
new IID("e9a4aa5a-5a7b-4671-b7df-d5cadc54d485");
}
/*
* end
*/

View File

@@ -0,0 +1,53 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
JAVA_OR_NSJVM=1
include <$(topsrcdir)\config\rules.mak>
JAVA_SRC = \
MThreadComponent3.java
JAVAI_SRC = \
iMThreadComponent3.java
MThreadComponent3.jar.comp: manifest MThreadComponent3.class
$(JDKHOME)\bin\jar cvfm MThreadComponent3.jar.comp manifest *.class
MThreadComponent3.class:
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes $(JAVA_SRC)
export::
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
install-component: MThreadComponent3.jar.comp MThreadComponent3.jar.info
copy MThreadComponent3.jar* $(DIST)\bin\components
clobber::
del /f *.class *.jar.comp
del /f $(DIST)\bin\components\MThreadComponent3.jar.*
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMThreadComponent3.class
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1 @@
Component-Class: MThreadComponent3

View File

@@ -0,0 +1,4 @@
component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent1
component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent2
component://netscape/blackwood/blackconnect/test/mthreads/MThreadComponent3

View File

@@ -0,0 +1,37 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
DIRS= \
mtstart \
context \
1 \
2 \
3 \
$(NULL)
include $(DEPTH)/config/rules.mk

View File

@@ -0,0 +1,50 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
*/
/*
* ExecutionThread.java
*/
import org.mozilla.xpcom.*;
import java.util.Date;
public class ExecutionThread extends Thread {
public static int MAX_TIMEOUT = 20000;
int timeout = Integer.MAX_VALUE;
public static long ID = 0;
iMThreadComponent component;
public ExecutionThread(iMThreadComponent component){
this.ID = new Date().getTime();
this.setName(Long.toHexString(ID));
this.component = component;
}
public ExecutionThread(iMThreadComponent component, int timeout){
this.ID = new Date().getTime();
this.setName(Long.toHexString(ID));
this.component = component;
if(timeout < MAX_TIMEOUT) {
this.timeout = timeout;
}else {
this.timeout = MAX_TIMEOUT;
}
}
public int timeoutGen() {
return (int)Math.round(Math.random()*MAX_TIMEOUT);
}
public void run(){
try {
if(timeout == Integer.MAX_VALUE) {
timeout = timeoutGen();
}
System.out.println("ExecutionThread(" + getName() + ") sleep to " + timeout);
sleep(timeout);
component.execute(getName());
} catch (Exception e) {
System.out.println("Execution thread had been interrupted");
}
}
}

View File

@@ -0,0 +1,181 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "plstr.h"
#include "prenv.h"
#include "stdio.h"
#include "nsMemory.h"
#include "BCTest.h"
#include <sys/stat.h>
#include <stdlib.h>
#include "MThreadContext.h"
#include "prmem.h"
#include "nsString.h"
#include "nsStringUtil.h"
#include "nsID.h"
nsIComponentManager* cm;
char **componentList;
int currentPosition = 0;
#define MT_COMPONENT_LIST_VAR_NAME "MT_COMPONENT_LIST"
MThreadContextImpl::MThreadContextImpl()
{
NS_INIT_REFCNT();
printf("DEbug:avm:MThreadContextImpl::MThreadContextImp\n");
nsresult rv = NS_GetGlobalComponentManager(&cm);
if(NS_FAILED(rv)) {
fprintf(stderr, "ERROR: Can't get GlobalComponentManager!!\n");
}
componentList = LoadComponentList();
}
MThreadContextImpl::~MThreadContextImpl()
{
//nb
}
NS_IMPL_ISUPPORTS1(MThreadContextImpl, iMThreadContext);
NS_IMETHODIMP MThreadContextImpl::GetNext(char **_retstr) {
nsCID aClass;
if(componentList == NULL) {
*_retstr = NULL;
return NS_OK; //nb
}
if(componentList[currentPosition]) {
*_retstr = componentList[currentPosition];
printf("MThreadContextImpl::GetNext. ContractID = %s\n",*_retstr);
nsresult rv = cm->ContractIDToClassID(*_retstr, &aClass);
if(NS_FAILED(rv)) {
printf("MThreadContextImpl::GetNext. Can't convert ContractID to ClassID\n");
*_retstr = NULL;
return NS_OK;
}else {
printf("MThreadContextImpl::GetNext. SUCCESS convert ContractID to ClassID\n");
}
*_retstr = aClass.ToString();
printf("MThreadContextImpl::GetNext. ClassID = %s\n",*_retstr);
currentPosition++;
} else {
*_retstr = NULL;
}
return NS_OK;
}
/*
NS_IMETHODIMP MThreadContextImpl::Initialize(const char* serverProgID)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP MThreadContextImpl::Execute(){
return NS_ERROR_NOT_IMPLEMENTED;
}
*/
NS_IMETHODIMP MThreadContextImpl::GetComponentManager(nsIComponentManager **_retval) {
*_retval = cm;
return NS_OK;
}
char** MThreadContextImpl::LoadComponentList() {
struct stat st;
FILE *file = NULL;
char *content;
int nRead, nTests, count = 0;
char *pos, *pos1;
char **testList;
char *lstFile = PR_GetEnv(MT_COMPONENT_LIST_VAR_NAME);
if(lstFile == NULL) {
fprintf(stderr, "ERROR: %s value is'n set\n",MT_COMPONENT_LIST_VAR_NAME);
return NULL;
}
if (stat(lstFile, &st) < 0) {
fprintf(stderr, "ERROR: can't get stat from file %s\n",lstFile);
return NULL;
}
content = (char*)calloc(1, st.st_size+1);
if ((file = fopen(lstFile, "r")) == NULL) {
fprintf(stderr, "ERROR: can't open file %s\n",lstFile);
return NULL;
}
if ((nRead = fread(content, 1, st.st_size, file)) < st.st_size) {
fprintf(stderr, "WARNING: can't read entire file in text mode (%d of %d) !\n", nRead, st.st_size);
//return;
}
content[nRead] = 0;
printf("File content: %s\n", content);
fclose(file);
//allocate maximal possible size
nTests = countChars(content, '\n') + 2;
printf("nTests = %d\n", nTests);
testList = (char**)calloc(sizeof(char*), nTests);
testList[0] = 0;
pos = content;
while((pos1 = PL_strchr(pos, '\n'))) {
*pos1 = 0;
if(PL_strlen(pos) > 0 && *pos != '#') {
//printf("First char: %c\n", *pos);
testList[count++] = PL_strdup(pos);
}
pos = pos1+1;
if (!(*pos)) {
printf("Parser done: %d .. ", count);
testList[count] = 0;
printf("ok\n");
break;
}
}
//If there is no \n after last line
if (PL_strlen(pos) > 0 && *pos != '#') {
testList[count++] = PL_strdup(pos);
testList[count] = 0;
}
//free(content);
return testList;
}
int MThreadContextImpl::countChars(char* buf, char ch) {
char *pos = buf;
int count = 0;
while((pos = PL_strchr(pos, ch))) {
pos++;
count++;
}
return count;
}

View File

@@ -0,0 +1,58 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "iMThreadContext.h"
class MThreadContextImpl : public iMThreadContext
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMTHREADCONTEXT
char** LoadComponentList();
int countChars(char* buf, char ch);
MThreadContextImpl();
virtual ~MThreadContextImpl();
};
class _MYCLASS_ : public iMThreadContext
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMTHREADCONTEXT
_MYCLASS_();
virtual ~_MYCLASS_();
/* additional members */
};

View File

@@ -0,0 +1,39 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsIGenericFactory.h"
#include "MThreadContext.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(MThreadContextImpl)
static nsModuleComponentInfo components[] =
{
{ "J2XIN Server Test Component", MTHREADCONTEXT_CID, MTHREADCONTEXT_PROGID, MThreadContextImplConstructor,
NULL /* NULL if you dont need one */,
NULL /* NULL if you dont need one */
}
};
NS_IMPL_NSGETMODULE("MThreadContextFactory", components)

View File

@@ -0,0 +1,60 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
include $(DEPTH)/config/autoconf.mk
MODULE = MThreadContext
LIBRARY_NAME = $(MODULE)
XPIDL_MODULE = $(MODULE)
IS_COMPONENT = 1
CPPSRCS = \
MThreadContext.cpp \
MThreadContextFactory.cpp \
$(NULL)
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
XPIDLSRCS = iMThreadContext.idl \
iMThreadComponent.idl
JAVAI_SRC = iMThreadContext.java \
iMThreadComponent.java
JAVA_SRC = ExecutionThread.java
include $(topsrcdir)/config/rules.mk
export::
$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes $(JAVAI_SRC)
$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes $(JAVA_SRC)

View File

@@ -0,0 +1,32 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
#include "iMThreadContext.idl"
[scriptable, uuid(b4d98604-3226-4077-abf0-b3aa2a4eff26)]
interface iMThreadComponent : nsISupports
{
void Initialize(in iMThreadContext c);
void Execute(in string tName);
};

View File

@@ -0,0 +1,33 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMThreadComponent.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMThreadComponent
*
* IID: 0xb4d98604-3226-4077-abf0-b3aa2a4eff26
*/
public interface iMThreadComponent extends nsISupports
{
public static final IID IID =
new IID("b4d98604-3226-4077-abf0-b3aa2a4eff26");
/* void Initialize (in iMThreadContext c); */
public void initialize(iMThreadContext c);
/* void Execute (in string tName); */
public void execute(String tName);
}
/*
* end
*/

View File

@@ -0,0 +1,95 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM iMThreadContext.idl
*/
#ifndef __gen_iMThreadContext_h__
#define __gen_iMThreadContext_h__
#include "nsISupports.h"
#include "nsIComponentManager.h"
/* starting interface: iMThreadContext */
#define IMTHREADCONTEXT_IID_STR "a7b26685-9816-4eb6-a075-36f539a7a823"
#define IMTHREADCONTEXT_IID \
{0xa7b26685, 0x9816, 0x4eb6, \
{ 0xa0, 0x75, 0x36, 0xf5, 0x39, 0xa7, 0xa8, 0x23 }}
class NS_NO_VTABLE iMThreadContext : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(IMTHREADCONTEXT_IID)
/* string GetNext (); */
NS_IMETHOD GetNext(char **_retval) = 0;
/* nsIComponentManager GetComponentManager (); */
NS_IMETHOD GetComponentManager(nsIComponentManager **_retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMTHREADCONTEXT \
NS_IMETHOD GetNext(char **_retval); \
NS_IMETHOD GetComponentManager(nsIComponentManager **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMTHREADCONTEXT(_to) \
NS_IMETHOD GetNext(char **_retval) { return _to ## GetNext(_retval); } \
NS_IMETHOD GetComponentManager(nsIComponentManager **_retval) { return _to ## GetComponentManager(_retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public iMThreadContext
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMTHREADCONTEXT
_MYCLASS_();
virtual ~_MYCLASS_();
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, iMThreadContext)
_MYCLASS_::_MYCLASS_()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* string GetNext (); */
NS_IMETHODIMP _MYCLASS_::GetNext(char **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIComponentManager GetComponentManager (); */
NS_IMETHODIMP _MYCLASS_::GetComponentManager(nsIComponentManager **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#define MTHREADCONTEXT_CID \
{ /* 139b8350-280a-46d0-8afc-f1939173c2ea */ \
0x139b8350, \
0x280a, \
0x46d0, \
{0x8a, 0xfc, 0xf1, 0x93, 0x91, 0x73, 0xc2, 0xea} \
}
#define MTHREADCONTEXT_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MThreadContext"
#endif /* __gen_iMThreadContext_h__ */

View File

@@ -0,0 +1,45 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
#include "nsIComponentManager.idl"
[scriptable, uuid(a7b26685-9816-4eb6-a075-36f539a7a823)]
interface iMThreadContext : nsISupports
{
string GetNext();
nsIComponentManager GetComponentManager();
};
%{ C++
#define MTHREADCONTEXT_CID \
{ /* 139b8350-280a-46d0-8afc-f1939173c2ea */ \
0x139b8350, \
0x280a, \
0x46d0, \
{0x8a, 0xfc, 0xf1, 0x93, 0x91, 0x73, 0xc2, 0xea} \
}
#define MTHREADCONTEXT_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MThreadContext"
%}

View File

@@ -0,0 +1,33 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMThreadContext.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMThreadContext
*
* IID: 0xa7b26685-9816-4eb6-a075-36f539a7a823
*/
public interface iMThreadContext extends nsISupports
{
public static final IID IID =
new IID("a7b26685-9816-4eb6-a075-36f539a7a823");
/* string GetNext (); */
public String getNext();
/* nsIComponentManager GetComponentManager (); */
public nsIComponentManager getComponentManager();
}
/*
* end
*/

View File

@@ -0,0 +1,63 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
MODULE = MThreadContext
MAKE_OBJ_TYPE =DLL
DLLNAME =$(MODULE)
DLL =.\$(OBJDIR)\$(DLLNAME).dll
COMPONENT = 1
JAVAI = iMThreadContext.java \
iMThreadComponent.java
JAVA_SRC = ExecutionThread.java
XPIDLSRCS = \
.\iMThreadContext.idl \
.\iMThreadComponent.idl\
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\MThreadContext.obj \
.\$(OBJDIR)\MThreadContextFactory.obj \
$(NULL)
LLIBS =$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
include <$(topsrcdir)\config\rules.mak>
javai:
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI) $(JAVA_SRC)
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI) $(JAVA_SRC)
install:: $(DLL) javai
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
clobber::
del /f $(DIST)\bin\components\$(DLLNAME).dll
del /f $(DIST)\bin\components\$(DLLNAME).xpt
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMThreadComponent.class
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMThreadContext.class

View File

@@ -0,0 +1,37 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
DIRS= \
mtstart \
context \
1 \
2 \
3 \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,79 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "plstr.h"
#include "stdio.h"
#include "nsIComponentManager.h"
#include "iMThreadContext.h"
#include "iMThreadComponent.h"
#include "MTStart.h"
#include "nsMemory.h"
#include <sys/stat.h>
#include <stdlib.h>
#include "nsID.h"
iMThreadContext* context;
MTStartImpl::MTStartImpl()
{
NS_INIT_REFCNT();
printf("MTStartImpl::MTStartImp\n");
nsresult rv = nsComponentManager::CreateInstance(MTHREADCONTEXT_PROGID,
nsnull,
NS_GET_IID(iMThreadContext),
(void**)&context);
if(NS_FAILED(rv)) {
printf("Create instance of context failed!!!");
return;
}
char* first;
context->GetNext(&first);
nsCID firstCID;
firstCID.Parse(first);
printf("ClassID is %s\n", firstCID.ToString());
iMThreadComponent* tComponent;
rv = nsComponentManager::CreateInstance(firstCID,
nsnull,
NS_GET_IID(iMThreadComponent),
(void**)&tComponent);
if(NS_FAILED(rv)) {
printf("Create instance failed from %s!!!",first);
return;
}
tComponent->Initialize(context);
tComponent->Execute("First from MTStart");
}
MTStartImpl::~MTStartImpl()
{
}
NS_IMPL_ISUPPORTS1(MTStartImpl, iMTStart);

View File

@@ -0,0 +1,36 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "iMTStart.h"
class MTStartImpl : public iMTStart
{
public:
MTStartImpl();
virtual ~MTStartImpl();
NS_DECL_ISUPPORTS
NS_DECL_IMTSTART
};

View File

@@ -0,0 +1,46 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsIGenericFactory.h"
#include "MTStart.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(MTStartImpl)
static nsModuleComponentInfo components[] =
{
{ "Multi thread tests start component", MTSTART_CID, MTSTART_PROGID, MTStartImplConstructor,
NULL /* NULL if you dont need one */,
NULL /* NULL if you dont need one */
}
};
NS_IMPL_NSGETMODULE("MTStartFactory", components)

View File

@@ -0,0 +1,49 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
include $(DEPTH)/config/autoconf.mk
MODULE = MTStart
LIBRARY_NAME = $(MODULE)
XPIDL_MODULE = $(MODULE)
IS_COMPONENT = 1
CPPSRCS = \
MTStart.cpp \
MTStartFactory.cpp \
$(NULL)
XPIDLSRCS = iMTStart.idl
JAVAI_SRC = iMTStart.java
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
export::
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $(JAVAI_SRC)

View File

@@ -0,0 +1,47 @@
/* -*- 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 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):
Client QA Team, St. Petersburg, Russia
*/
#include "nsISupports.idl"
[scriptable, uuid(e4254a67-4f09-43e6-8e83-7c1ae8541385)]
interface iMTStart : nsISupports
{
};
%{ C++
#define MTSTART_CID \
{ /* 13c62416-3378-4ecb-8ab2-9783f8980655 */ \
0x13c62416, \
0x3378, \
0x4ecb, \
{0x8a, 0xb2, 0x97, 0x83, 0xf8, 0x98, 0x06, 0x55} \
}
#define MTSTART_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MTStart"
%}

View File

@@ -0,0 +1,27 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iMTStart.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iMTStart
*
* IID: 0xe4254a67-4f09-43e6-8e83-7c1ae8541385
*/
public interface iMTStart extends nsISupports
{
public static final IID IID =
new IID("e4254a67-4f09-43e6-8e83-7c1ae8541385");
}
/*
* end
*/

View File

@@ -0,0 +1,60 @@
#!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 = $(DEPTH)
srcdir = .
VPATH = .
MODULE = MTStart
MAKE_OBJ_TYPE = DLL
DLLNAME = MTStart
DLL =.\$(OBJDIR)\$(DLLNAME).dll
COMPONENT = 1
JAVAI = \
.\iMTStart.java \
$(NULL)
XPIDLSRCS = \
.\iMTStart.idl \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\MTStart.obj \
.\$(OBJDIR)\MTStartFactory.obj \
$(NULL)
LLIBS =$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
include <$(DEPTH)\config\rules.mak>
javai:
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI)
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI)
install:: $(DLL) javai
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
clobber::
del /f $(DIST)\bin\components\$(DLLNAME).dll
del /f $(DIST)\bin\components\$(DLLNAME).xpt
del /f $(DIST)\..\classes\org\mozilla\xpcom\iMTStart.class

View File

@@ -0,0 +1,11 @@
<html>
<head>
<script>
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var tl = Components.classes["component://netscape/blackwood/blackconnect/test/mthreads/MTStart"].createInstance();
</script>
</head>
<body>
This file can be used to start BlackConnect MULTI-thread tests.
</body>