# Copyright 2014 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("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") # GYP version: extensions/extensions_resources.gyp:extensions_resources group("extensions_resources") { deps = [ ":extensions_renderer_resources", ":extensions_resources_grd", ] } # GYP version: extensions/extensions_resources.gyp:extensions_resources # (extensions_resources action) grit("extensions_resources_grd") { source = "extensions_resources.grd" outputs = [ "grit/extensions_resources.h", "extensions_resources.pak", ] } # GYP version: extensions/extensions_resources.gyp:extensions_resources # (exntensions_renderer_resources action) grit("extensions_renderer_resources") { source = "renderer/resources/extensions_renderer_resources.grd" outputs = [ "grit/extensions_renderer_resources.h", "extensions_renderer_resources.pak", ] grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir) ] if (enable_extensions) { deps = [ "//device/serial:serial_mojo", ] } } source_set("test_support") { sources = [ "browser/api/dns/mock_host_resolver_creator.cc", "browser/api/dns/mock_host_resolver_creator.h", "browser/api_test_utils.cc", "browser/api_test_utils.h", "browser/extensions_test.cc", "browser/extensions_test.h", "browser/test_extensions_browser_client.cc", "browser/test_extensions_browser_client.h", "browser/test_management_policy.cc", "browser/test_management_policy.h", "browser/test_runtime_api_delegate.cc", "browser/test_runtime_api_delegate.h", "common/extension_builder.cc", "common/extension_builder.h", "common/test_util.cc", "common/test_util.h", "common/value_builder.cc", "common/value_builder.h", "renderer/test_extensions_renderer_client.cc", "renderer/test_extensions_renderer_client.h", "test/test_extensions_client.cc", "test/test_extensions_client.h", "test/test_permission_message_provider.cc", "test/test_permission_message_provider.h", "test/test_permissions_provider.cc", "test/test_permissions_provider.h", ] deps = [ ":extensions_resources", "//base", "//extensions/browser", "//extensions/common", "//extensions/common/api", "//extensions/common/api:api_registration", "//net:test_support", "//testing/gmock", "//testing/gtest", ] if (is_win) { cflags = [ "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. ] } } # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak repack("shell_and_test_pak") { sources = [ "$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/chrome/extensions_api_resources.pak", # TODO(jamescook): Extract the extension/app related resources # from generated_resources_en-US.pak. http://crbug.com/397250 "$root_gen_dir/chrome/generated_resources_en-US.pak", "$root_gen_dir/chrome/renderer_resources_100_percent.pak", "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/shell/shell_resources.pak", "$root_gen_dir/extensions/extensions_renderer_resources.pak", "$root_gen_dir/extensions/extensions_resources.pak", "$root_gen_dir/extensions/shell/app_shell_resources.pak", "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak", "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", "$root_gen_dir/ui/strings/ui_strings_en-US.pak", "$root_gen_dir/webkit/devtools_resources.pak", ] output = "$root_out_dir/extensions_shell_and_test.pak" deps = [ ":extensions_resources", # Need extension related resources in common_resources.pak and # renderer_resources_100_percent.pak "//chrome:resources", # Need dev-tools related resources in shell_resources.pak and # devtools_resources.pak. "//content/browser/devtools:resources", "//content/shell:resources", "//content:resources", "//extensions/shell:resources", "//extensions/strings", "//ui/resources", "//ui/strings", ] } # TODO(GYP): Enable this link errors are fixed. if (false) { # TODO(tfarina): Many extension unit tests run as part of Chrome"s # unit_tests target. They should be moved here, which may require some # refactoring (ExtensionsBrowserClient, TestingProfile, etc.). # http://crbug.com/348066 test("unittests") { output_name = "extensions_unittests" sources = [ "browser/info_map_unittest.cc", "browser/process_manager_unittest.cc", "common/api/sockets/sockets_manifest_permission_unittest.cc", "common/csp_validator_unittest.cc", "common/event_filter_unittest.cc", "common/extension_resource_unittest.cc", "common/extension_set_unittest.cc", "common/manifest_handler_unittest.cc", "common/message_bundle_unittest.cc", "common/one_shot_event_unittest.cc", "common/permissions/manifest_permission_set_unittest.cc", "common/url_pattern_set_unittest.cc", "common/url_pattern_unittest.cc", "common/user_script_unittest.cc", "renderer/activity_log_converter_strategy_unittest.cc", "renderer/api/serial/data_receiver_unittest.cc", "renderer/api/serial/data_sender_unittest.cc", "renderer/api/serial/serial_api_unittest.cc", "renderer/api_test_base.cc", "renderer/api_test_base.h", "renderer/api_test_base_unittest.cc", "renderer/event_unittest.cc", "renderer/json_schema_unittest.cc", "renderer/messaging_utils_unittest.cc", "renderer/module_system_test.cc", "renderer/module_system_test.h", "renderer/module_system_unittest.cc", "renderer/safe_builtins_unittest.cc", "renderer/script_context_set_unittest.cc", "renderer/utils_unittest.cc", "test/extensions_unittests_main.cc", ] deps = [ ":extensions_resources", ":shell_and_test_pak", ":test_support", "//base", "//base/test:test_support", "//content/test:test_support", "//device/serial", "//device/serial:test_util", "//extensions/common", "//extensions/renderer", "//extensions/strings", "//mojo/environment:chromium", "//mojo/public/cpp/bindings", "//mojo/bindings/js", "//mojo/system", "//testing/gmock", "//testing/gtest", ] if (is_win) { deps += [ "//base/allocator", ] } } }