mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Backing out Bug 410156 due to test bustage
This commit is contained in:
parent
885fcb1efa
commit
e7ddfe22b5
@ -95,7 +95,6 @@ protected:
|
|||||||
void *aClosure);
|
void *aClosure);
|
||||||
|
|
||||||
void appendArg(const char* arg);
|
void appendArg(const char* arg);
|
||||||
void resolveShortcutURL(nsILocalFile* aFile, nsACString& outURL);
|
|
||||||
nsresult EnumerateHandlers(EnumerateHandlersCallback aCallback, void *aClosure);
|
nsresult EnumerateHandlers(EnumerateHandlersCallback aCallback, void *aClosure);
|
||||||
nsresult EnumerateValidators(EnumerateValidatorsCallback aCallback, void *aClosure);
|
nsresult EnumerateValidators(EnumerateValidatorsCallback aCallback, void *aClosure);
|
||||||
|
|
||||||
@ -443,28 +442,18 @@ nsCommandLine::ResolveURI(const nsAString& aArgument, nsIURI* *aResult)
|
|||||||
nsCOMPtr<nsIIOService> io = do_GetIOService();
|
nsCOMPtr<nsIIOService> io = do_GetIOService();
|
||||||
NS_ENSURE_TRUE(io, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(io, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
nsCOMPtr<nsIURI> workingDirURI;
|
|
||||||
if (mWorkingDir) {
|
|
||||||
io->NewFileURI(mWorkingDir, getter_AddRefs(workingDirURI));
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsILocalFile> lf (do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
|
nsCOMPtr<nsILocalFile> lf (do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
|
||||||
rv = lf->InitWithPath(aArgument);
|
rv = lf->InitWithPath(aArgument);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
lf->Normalize();
|
lf->Normalize();
|
||||||
nsCAutoString url;
|
|
||||||
// Try to resolve the url for .url files.
|
|
||||||
resolveShortcutURL(lf, url);
|
|
||||||
if (!url.IsEmpty()) {
|
|
||||||
return io->NewURI(url,
|
|
||||||
nsnull,
|
|
||||||
workingDirURI,
|
|
||||||
aResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
return io->NewFileURI(lf, aResult);
|
return io->NewFileURI(lf, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsCOMPtr<nsIURI> workingDirURI;
|
||||||
|
if (mWorkingDir) {
|
||||||
|
io->NewFileURI(mWorkingDir, getter_AddRefs(workingDirURI));
|
||||||
|
}
|
||||||
|
|
||||||
return io->NewURI(NS_ConvertUTF16toUTF8(aArgument),
|
return io->NewURI(NS_ConvertUTF16toUTF8(aArgument),
|
||||||
nsnull,
|
nsnull,
|
||||||
workingDirURI,
|
workingDirURI,
|
||||||
@ -488,22 +477,6 @@ nsCommandLine::appendArg(const char* arg)
|
|||||||
mArgs.AppendString(warg);
|
mArgs.AppendString(warg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsCommandLine::resolveShortcutURL(nsILocalFile* aFile, nsACString& outURL)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIFileProtocolHandler> fph;
|
|
||||||
nsresult rv = NS_GetFileProtocolHandler(getter_AddRefs(fph));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIURI> uri;
|
|
||||||
rv = fph->ReadURLFile(aFile, getter_AddRefs(uri));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return;
|
|
||||||
|
|
||||||
uri->GetSpec(outURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCommandLine::Init(PRInt32 argc, char** argv, nsIFile* aWorkingDir,
|
nsCommandLine::Init(PRInt32 argc, char** argv, nsIFile* aWorkingDir,
|
||||||
PRUint32 aState)
|
PRUint32 aState)
|
||||||
|
@ -45,16 +45,9 @@ VPATH = @srcdir@
|
|||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = test_harness_commandlines
|
MODULE = test_harness_commandlines
|
||||||
TESTROOT = $(shell cd $(DEPTH) && pwd)/_tests/xpcshell-simple/$(MODULE)
|
|
||||||
|
|
||||||
XPCSHELL_TESTS = \
|
XPCSHELL_TESTS = \
|
||||||
unit \
|
unit \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH)))
|
|
||||||
# Hack to allow preprocessing of test_bug410156.js
|
|
||||||
libs:: unit/test_bug410156.js.in
|
|
||||||
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $^ > $(TESTROOT)/unit/test_bug410156.js
|
|
||||||
endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user