mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Add test case for nsIAcceptLang
This commit is contained in:
parent
c06ee76d8e
commit
bb077d2b78
@ -25,6 +25,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIAcceptLang.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsILocale.h"
|
||||
#include <iostream.h>
|
||||
@ -67,6 +68,9 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kIStringBundleServiceIID, NS_ISTRINGBUNDLESERVICE_IID);
|
||||
|
||||
static NS_DEFINE_IID(kAcceptLangCID, NS_ACCEPTLANG_CID);
|
||||
static NS_DEFINE_IID(kIAcceptLangIID, NS_IACCEPTLANG_IID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// let add some locale stuff
|
||||
@ -175,6 +179,15 @@ main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsIAcceptLang* Aservice = nsnull;
|
||||
ret = nsServiceManager::GetService(kAcceptLangCID,
|
||||
kIAcceptLangIID, (nsISupports**) &Aservice);
|
||||
if (NS_FAILED(ret)) {
|
||||
printf("cannot create AcceptLang service\n");
|
||||
return 1;
|
||||
}
|
||||
printf("\n ** created AcceptLang service\n");
|
||||
|
||||
nsILocale* locale = get_applocale();
|
||||
|
||||
nsIStringBundle* bundle = nsnull;
|
||||
|
Loading…
Reference in New Issue
Block a user