*not part of the buld*

blackConnect tests update


git-svn-id: svn://10.0.0.236/trunk@99925 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2001-07-25 22:05:35 +00:00
parent ad651ef17b
commit 4e0a322dbc
92 changed files with 1360 additions and 885 deletions

View File

@@ -22,7 +22,9 @@
*/
#include "plstr.h"
#include "prmem.h"
#include "stdio.h"
#include "prthread.h"
#include "nsIComponentManager.h"
#include "iMThreadContext.h"
#include "iMThreadComponent.h"
@@ -32,7 +34,10 @@
#include <stdlib.h>
#include "nsID.h"
iMThreadContext* context;
iMThreadContext* context=NULL;
void* eThread=NULL;
FILE *file=NULL;
MTStartImpl::MTStartImpl()
{
NS_INIT_REFCNT();
@@ -42,25 +47,47 @@ MTStartImpl::MTStartImpl()
NS_GET_IID(iMThreadContext),
(void**)&context);
if(NS_FAILED(rv)) {
printf("Create instance of context failed!!!");
fprintf(stderr, "Create instance of context failed!!!");
return;
}
char* first;
context->GetNext(&first);
char* first=(char*)PR_Malloc(sizeof(char*));
context->GetContractID(0,1,&first);
nsCID firstCID;
firstCID.Parse(first);
printf("ClassID is %s\n", firstCID.ToString());
iMThreadComponent* tComponent;
iMThreadComponent* tComponent=NULL;
rv = nsComponentManager::CreateInstance(firstCID,
nsnull,
NS_GET_IID(iMThreadComponent),
(void**)&tComponent);
if(NS_FAILED(rv)) {
printf("Create instance failed from %s!!!",first);
fprintf(stderr, "Create instance failed from %s!!!",first);
return;
}
eThread = PR_GetCurrentThread();
char* res=(char*)PR_Malloc(sizeof(char*));
context->GetResFile(&res);
if ((file = fopen(res, "w+t")) == NULL) {
fprintf(stderr, "ERROR: can't open file %s\n",res);
}
char* tmp="0,0,";
fwrite(tmp,1,PL_strlen(tmp),file);
sprintf(tmp,"%d\n",eThread);
fwrite(tmp,1,PL_strlen(tmp),file);
fclose(file);
tComponent->Initialize(context);
tComponent->Execute("First from MTStart");
nsIComponentManager* cm;
rv = NS_GetGlobalComponentManager(&cm);
if(NS_FAILED(rv)) {
fprintf(stderr, "ERROR: Can't get GlobalComponentManager!!\n");
}
tComponent->THack(cm);
tComponent->Execute(0,1);
}
MTStartImpl::~MTStartImpl()
@@ -68,12 +95,3 @@ MTStartImpl::~MTStartImpl()
}
NS_IMPL_ISUPPORTS1(MTStartImpl, iMTStart);

View File

@@ -36,11 +36,3 @@ static nsModuleComponentInfo components[] =
};
NS_IMPL_NSGETMODULE("MTStartFactory", components)

View File

@@ -18,6 +18,8 @@
# Rights Reserved.
#
# Contributor(s):
# Client QA Team, St. Petersburg, Russia
#
DEPTH=../../../../../..
topsrcdir = $(DEPTH)

View File

@@ -40,7 +40,7 @@ interface iMTStart : nsISupports
{0x8a, 0xb2, 0x97, 0x83, 0xf8, 0x98, 0x06, 0x55} \
}
#define MTSTART_PROGID "component://netscape/blackwood/blackconnect/test/mthreads/MTStart"
#define MTSTART_PROGID "@mozilla/blackwood/blackconnect/test/mthreads/MTStart;1"
%}

View File

@@ -18,6 +18,8 @@
# Rights Reserved.
#
# Contributor(s):
# Client QA Team, St. Petersburg, Russia
#
DEPTH=..\..\..\..\..\..
topsrcdir = $(DEPTH)
@@ -29,10 +31,10 @@ MAKE_OBJ_TYPE = DLL
DLLNAME = MTStart
DLL =.\$(OBJDIR)\$(DLLNAME).dll
COMPONENT = 1
JAVA_OR_NSJVM=1
NO_CAFE=1
JAVAI = \
.\iMTStart.java \
$(NULL)
include <$(DEPTH)\config\config.mak>
XPIDLSRCS = \
.\iMTStart.idl \
@@ -45,16 +47,17 @@ CPP_OBJS = \
LLIBS =$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
JDIRS = .
JAVAC_PROG=$(JDKHOME)\bin\javac
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
include <$(DEPTH)\config\rules.mak>
include <$(DEPTH)\config\javarules.mak>
javai:
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI)
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI)
install:: $(DLL) javai
install:: $(DLL)
$(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