diff --git a/widget/tests/widget/main.cpp b/widget/tests/widget/main.cpp index 758ac3e632f2..81ad9cfe33c1 100644 --- a/widget/tests/widget/main.cpp +++ b/widget/tests/widget/main.cpp @@ -25,13 +25,18 @@ extern nsresult WidgetTest(int * argc, char **argv); void main(int argc, char **argv) { - WidgetTest(); + int argC = argc; + + WidgetTest(&argC, argv); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { - return(WidgetTest()); + int argC = 0; + char ** argv = NULL; + + return(WidgetTest(&argC, argv)); } #endif diff --git a/widget/tests/widget/nsWidgetTest.cpp b/widget/tests/widget/nsWidgetTest.cpp index 6cdd5bec33d2..16a3adefe883 100644 --- a/widget/tests/widget/nsWidgetTest.cpp +++ b/widget/tests/widget/nsWidgetTest.cpp @@ -205,7 +205,8 @@ void listSelfTest(FILE * fd, char * aTitle, nsIListWidget * listBox) { fprintf(fd, "\tSelection should be [%d] is [%d] Test: [%s]\n", inx, sel, eval(inx == (int)sel)); fflush(fd); - sel = listBox->FindItem(item4, 0); + nsString item4Str(item4); + sel = listBox->FindItem(item4Str, 0); fprintf(fd, "\nTesting FindItem\n");fflush(fd); fprintf(fd, "\tItem index should be [%d] index is [%d] Test: [%s]\n", inx, sel, eval(inx == (int)sel)); fflush(fd); @@ -1087,6 +1088,8 @@ nsEventStatus PR_CALLBACK DoSelfTests(nsGUIEvent *aEvent) listSelfTest(gFD, "ComboBox", comboBox); multiListSelfTest(gFD, "Multi-ListBox", gMultiListBox); + return nsEventStatus_eIgnore; + } /**--------------------------------------------------------------------------------