# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//ios/web/js_compile.gni") import("//mojo/public/tools/bindings/mojom.gni") import("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") mojom("mojo_bindings") { testonly = true sources = [ "mojo_test.mojom" ] } repack("packed_resources") { testonly = true sources = [ "$root_gen_dir/ios/web/ios_web_resources.pak", "$root_gen_dir/ios/web/test/test_resources.pak", "$root_gen_dir/ui/resources/webui_generated_resources.pak", "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ ":resources", "//ios/web:resources", "//ui/resources", ] output = "$target_gen_dir/resources.pak" copy_data_to_bundle = true } grit("resources") { source = "test_resources.grd" inputs = [ "${root_gen_dir}/ios/web/test/mojo_test.mojom.js" ] deps = [ ":mojo_bindings_js" ] outputs = [ "grit/test_resources.h", "test_resources.pak", ] } source_set("test_support") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true # This public_dep is a workaround because there is a circular dependency # (this target should public_dep on //ios/web/public/test). public_deps = [ "//testing/gtest" ] deps = [ ":all_frames_web_test_bundle", ":test_constants", "//base", "//base/test:test_support", "//components/crash/core/common", "//ios/testing:verify_custom_webkit", "//ios/web", "//ios/web/common:web_view_creation_util", "//ios/web/navigation:core", "//ios/web/public/test:util", "//ios/web/public/test/fakes", "//ios/web/public/test/http_server", "//ios/web/test/fakes", "//net", "//third_party/ocmock", "//ui/base", ] sources = [ "test_web_thread.cc", "url_test_util.mm", "web_int_test.h", "web_int_test.mm", "web_task_environment.cc", "web_test_suite.mm", "web_test_with_web_controller.h", "web_test_with_web_controller.mm", "wk_web_view_crash_utils.h", "wk_web_view_crash_utils.mm", ] } source_set("test_constants") { testonly = true sources = [ "test_url_constants.cc", "test_url_constants.h", ] } js_compile_bundle("all_frames_web_test_bundle") { testonly = true closure_entry_point = "__crWeb.allFramesWebTestBundle" sources = [ "resources/all_frames_web_test_bundle.js", "resources/cookie_test.js", ] }