main.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C) 2012 Samsung Electronics
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public License
  15. * along with this program; see the file COPYING.LIB. If not, write to
  16. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. */
  19. #include "config.h"
  20. #include "EWebKit2.h"
  21. #include "TestController.h"
  22. #include <wtf/Assertions.h>
  23. #include <stdlib.h>
  24. #ifdef HAVE_ECORE_X
  25. #include <X11/Xlib.h>
  26. #include <X11/extensions/Xext.h>
  27. static int dummyExtensionErrorHandler(Display*, _Xconst char*, _Xconst char*)
  28. {
  29. return 0;
  30. }
  31. #endif
  32. int main(int argc, char** argv)
  33. {
  34. WTFInstallReportBacktraceOnCrashHook();
  35. #ifdef HAVE_ECORE_X
  36. XSetExtensionErrorHandler(dummyExtensionErrorHandler);
  37. #endif
  38. if (!ewk_init())
  39. return 1;
  40. {
  41. // Test controller has own ptr containing WebView and WebView must be deleted
  42. // before its evas object is deleted. Call of ewk_shutdown() leads to evas objects deletion.
  43. WTR::TestController controller(argc, const_cast<const char**>(argv));
  44. }
  45. ewk_shutdown();
  46. return 0;
  47. }