# 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("//testing/test.gni") group("common") { public_deps = [ ":common_base", ":url_type_converters", ] } # GYP version: mojo/mojo_base.gyp:mojo_common_lib component("common_base") { output_name = "mojo_common_lib" sources = [ "common_type_converters.cc", "common_type_converters.h", "data_pipe_drainer.cc", "data_pipe_drainer.h", "data_pipe_file_utils.cc", "data_pipe_utils.cc", "data_pipe_utils.h", "user_agent.cc", "user_agent.h", ] defines = [ "MOJO_COMMON_IMPLEMENTATION" ] public_deps = [ "//mojo/public/cpp/system", ] deps = [ "//base", "//base/third_party/dynamic_annotations", "//mojo/message_pump", "//mojo/public/c/system:for_component", "//mojo/public/cpp/bindings", ] } # GYP version: mojo/mojo_base.gyp:mojo_url_type_converters source_set("url_type_converters") { sources = [ "url_type_converters.cc", "url_type_converters.h", ] deps = [ ":common_base", "//base", "//base/third_party/dynamic_annotations", "//mojo/public/cpp/bindings", "//url", ] } # GYP version: mojo/mojo_base.gyp:mojo_common_unittests test("mojo_common_unittests") { deps = [ ":common", "//base", "//base:message_loop_tests", "//base/test:test_support", "//mojo/edk/test:run_all_unittests", "//mojo/edk/test:test_support", "//mojo/message_pump", "//mojo/public/cpp/bindings", "//mojo/public/cpp/test_support:test_utils", "//testing/gtest", "//url", ] sources = [ # The message_pump tests are so small and some what related to this code # that we put them here. "../message_pump/handle_watcher_unittest.cc", "../message_pump/message_pump_mojo_unittest.cc", "common_type_converters_unittest.cc", ] if (is_linux && !is_component_build) { # This tests dynamically loads libmojo_test_support even in non-component # builds. configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } } test("mojo_common_perftests") { deps = [ ":common", "//base", "//mojo/edk/test:run_all_perftests", "//mojo/message_pump", "//mojo/public/cpp/test_support:test_utils", "//testing/gtest", ] sources = [ "../message_pump/handle_watcher_perftest.cc", ] if (is_linux && !is_component_build) { # This test dynamically loads libmojo_test_support even in non-component # builds. configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } }