Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
TestUICommandCollector.cpp File Reference
#include <stdio.h>
#include "TestCommon.h"
#include "nsXPCOM.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentEvent.h"
#include "nsIDOMElement.h"
#include "nsIDOMEvent.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMText.h"
#include "nsIDOMXULCommandEvent.h"
#include "nsIPrivateDOMEvent.h"
#include "nsComponentManagerUtils.h"
#include "nsUICommandCollector.h"
#include "nsMetricsService.h"
#include "nsMetricsModule.cpp"

Go to the source code of this file.

Classes

class  UICommandCollectorTest

Functions

int main (int argc, char *argv[])

Variables

static int gTotalTests = 0
static int gPassedTests = 0

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 259 of file TestUICommandCollector.cpp.

{
  nsStaticModuleInfo staticComps = { "metrics", &NSGetModule };
  NS_InitXPCOM3(nsnull, nsnull, nsnull, &staticComps, 1);
  // Pre-initialize the metrics service since it's assumed to exist
  nsMetricsService::get();

  // Use a separate instantiation of the test objects for each test
  {
    UICommandCollectorTest test;
    test.SetUp();
    test.TestGetEventTargets();
  }
  {
    UICommandCollectorTest test;
    test.SetUp();
    test.TestGetEventKeyId();
  }

  NS_ShutdownXPCOM(nsnull);

  printf("%d/%d tests passed\n", gPassedTests, gTotalTests);
  return 0;
}

Here is the call graph for this function:


Variable Documentation

int gPassedTests = 0 [static]

Definition at line 65 of file TestUICommandCollector.cpp.

int gTotalTests = 0 [static]

Definition at line 64 of file TestUICommandCollector.cpp.