diff --git a/content/base/src/mozSanitizingSerializer.h b/content/base/src/mozSanitizingSerializer.h index 85e48c1085a..e9f11617b53 100644 --- a/content/base/src/mozSanitizingSerializer.h +++ b/content/base/src/mozSanitizingSerializer.h @@ -51,6 +51,7 @@ #include "nsIDocumentEncoder.h" #include "nsString.h" #include "nsIParser.h" +#include "nsHashtable.h" class mozSanitizingHTMLSerializer : public nsIContentSerializer, public nsIHTMLContentSink, diff --git a/parser/htmlparser/tests/Makefile.in b/parser/htmlparser/tests/Makefile.in index db02253a76a..5bdd1755f56 100644 --- a/parser/htmlparser/tests/Makefile.in +++ b/parser/htmlparser/tests/Makefile.in @@ -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 diff --git a/parser/htmlparser/tests/grabpage/Makefile.in b/parser/htmlparser/tests/grabpage/Makefile.in index 675f49ed9db..26da855a3eb 100644 --- a/parser/htmlparser/tests/grabpage/Makefile.in +++ b/parser/htmlparser/tests/grabpage/Makefile.in @@ -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) diff --git a/parser/htmlparser/tests/grabpage/grabpage.cpp b/parser/htmlparser/tests/grabpage/grabpage.cpp index 6583132af07..26d9248686f 100644 --- a/parser/htmlparser/tests/grabpage/grabpage.cpp +++ b/parser/htmlparser/tests/grabpage/grabpage.cpp @@ -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... diff --git a/parser/htmlparser/tests/html/Makefile.in b/parser/htmlparser/tests/html/Makefile.in index 6a648133305..cfb5cab9c74 100644 --- a/parser/htmlparser/tests/html/Makefile.in +++ b/parser/htmlparser/tests/html/Makefile.in @@ -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) diff --git a/parser/htmlparser/tests/html/TestParser.cpp b/parser/htmlparser/tests/html/TestParser.cpp index 1620c9eb547..0f6e9c72376 100644 --- a/parser/htmlparser/tests/html/TestParser.cpp +++ b/parser/htmlparser/tests/html/TestParser.cpp @@ -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;