BUILD.gn 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/ios/rules.gni")
  5. import("//ios/build/config.gni")
  6. import("//ios/web_view/features.gni")
  7. import("//testing/test.gni")
  8. source_set("inttests") {
  9. testonly = true
  10. sources = []
  11. # All those test files use framework import, thus they depend on the name
  12. # of the framework. If some bot build the framework with a different name,
  13. # their compilation fail. So only build those files if the framework has
  14. # not be renamed.
  15. if (ios_web_view_output_name == "ChromeWebView") {
  16. sources += [
  17. "navigation_delegate_inttest.mm",
  18. "scroll_view_kvo_inttest.mm",
  19. "ui_delegate_inttest.mm",
  20. "web_view_autofill_inttest.mm",
  21. "web_view_back_forward_list_inttest.mm",
  22. "web_view_from_wk_web_view_configuration_inttest.mm",
  23. "web_view_inttest.mm",
  24. "web_view_inttest_base.h",
  25. "web_view_inttest_base.mm",
  26. "web_view_kvo_inttest.mm",
  27. "web_view_restorable_state_inttest.mm",
  28. "web_view_script_command_inttest.mm",
  29. "web_view_script_message_handler_inttest.mm",
  30. ]
  31. }
  32. deps = [
  33. ":test_support",
  34. "//base",
  35. "//base/test:run_all_unittests",
  36. "//base/test:test_support",
  37. "//components/url_formatter",
  38. "//components/variations",
  39. "//components/variations:test_support",
  40. "//ios/third_party/webkit",
  41. "//ios/web/common:uikit",
  42. "//ios/web_view:web_view+link",
  43. "//net",
  44. "//net:test_support",
  45. "//testing/gtest",
  46. "//third_party/ocmock",
  47. ]
  48. configs += [ "//build/config/compiler:enable_arc" ]
  49. }
  50. source_set("test_support") {
  51. testonly = true
  52. sources = [
  53. # Explicitly reference imported headers from web_view library to avoid
  54. # depending on the framework (as it is statically linked).
  55. "//ios/web_view/public/cwv_export.h",
  56. "//ios/web_view/public/cwv_navigation_delegate.h",
  57. "//ios/web_view/public/cwv_navigation_type.h",
  58. "//ios/web_view/public/cwv_web_view.h",
  59. "//ios/web_view/public/cwv_web_view_configuration.h",
  60. "observer.h",
  61. "observer.mm",
  62. "test_with_locale_and_resources.cc",
  63. "test_with_locale_and_resources.h",
  64. "web_view_test_util.h",
  65. "web_view_test_util.mm",
  66. ]
  67. deps = [
  68. "//base:base",
  69. "//base/test:test_support",
  70. "//ios/third_party/webkit",
  71. "//testing/gtest",
  72. "//ui/base",
  73. ]
  74. configs += [ "//build/config/compiler:enable_arc" ]
  75. }