зеркало из https://github.com/mozilla/pjs.git
Bug 319997 - Convert parser tests to use the frozen linkage, r=mrbkap
This commit is contained in:
Родитель
2e14eaf45f
Коммит
21de91b05c
|
@ -51,6 +51,7 @@
|
|||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
class mozSanitizingHTMLSerializer : public nsIContentSerializer,
|
||||
public nsIHTMLContentSink,
|
||||
|
|
|
@ -42,9 +42,15 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = outsinks \
|
||||
grabpage \
|
||||
html \
|
||||
$(NULL)
|
||||
DIRS = \
|
||||
grabpage \
|
||||
html \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_ENABLE_LIBXUL
|
||||
DIRS += \
|
||||
outsinks \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -43,7 +43,6 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = grabpage$(BIN_SUFFIX)
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
|
@ -53,6 +52,7 @@ REQUIRES = xpcom \
|
|||
CPPSRCS = grabpage.cpp
|
||||
|
||||
LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include "nsIStreamListener.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
#include "nsNetCID.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -49,8 +51,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
|||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static nsIEventQueue* gEventQ = nsnull;
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "nsCRT.h"
|
||||
#include "prprf.h"
|
||||
|
||||
|
@ -178,7 +179,7 @@ public:
|
|||
|
||||
nsresult Init(nsILocalFile *aDirectory);
|
||||
|
||||
nsresult Grab(const nsAFlatCString& aURL);
|
||||
nsresult Grab(const nsCString& aURL);
|
||||
|
||||
protected:
|
||||
nsILocalFile* NextFile(const char* aExtension);
|
||||
|
@ -216,7 +217,7 @@ PageGrabber::NextFile(const char* aExtension)
|
|||
}
|
||||
|
||||
nsresult
|
||||
PageGrabber::Grab(const nsAFlatCString& aURL)
|
||||
PageGrabber::Grab(const nsCString& aURL)
|
||||
{
|
||||
nsresult rv;
|
||||
// Create the Event Queue for this thread...
|
||||
|
@ -240,7 +241,7 @@ PageGrabber::Grab(const nsAFlatCString& aURL)
|
|||
fputs(aURL.get(), stdout);
|
||||
nsAutoString path;
|
||||
file->GetPath(path);
|
||||
NS_ConvertUCS2toUTF8 cpath(path);
|
||||
NS_ConvertUTF16toUTF8 cpath(path);
|
||||
printf(" to %s\n", cpath.get());
|
||||
|
||||
// Create the URL object...
|
||||
|
|
|
@ -42,8 +42,6 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
PROGRAM = TestParser$(BIN_SUFFIX)
|
||||
|
||||
REQUIRES = xpcom \
|
||||
|
@ -57,6 +55,7 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -37,10 +37,12 @@
|
|||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsILoggingSink.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
// Class IID's
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
|
@ -94,7 +96,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
|||
while(!done) {
|
||||
length = PR_Read(in, buffer, sizeof(buffer));
|
||||
if (length != 0) {
|
||||
stream.AppendWithConversion(buffer, length);
|
||||
stream.Append(NS_ConvertUTF8toUTF16(buffer, length));
|
||||
}
|
||||
else {
|
||||
done=PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче