| # 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("//mojo/public/mojo_application.gni") |
| import("//mojo/public/tools/bindings/mojom.gni") |
| import("//testing/test.gni") |
| |
| source_set("shell") { |
| output_name = "mojo_shell" |
| sources = [ |
| "application_instance.cc", |
| "application_instance.h", |
| "application_loader.h", |
| "application_manager.cc", |
| "application_manager.h", |
| "capability_filter.cc", |
| "capability_filter.h", |
| "connect_to_application_params.cc", |
| "connect_to_application_params.h", |
| "connect_util.cc", |
| "connect_util.h", |
| "data_pipe_peek.cc", |
| "data_pipe_peek.h", |
| "fetcher.cc", |
| "fetcher.h", |
| "identity.cc", |
| "identity.h", |
| "native_runner.h", |
| "package_manager.h", |
| "query_util.cc", |
| "query_util.h", |
| "shell_application_delegate.cc", |
| "shell_application_delegate.h", |
| "shell_application_loader.cc", |
| "shell_application_loader.h", |
| "static_application_loader.cc", |
| "static_application_loader.h", |
| "switches.cc", |
| "switches.h", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//mojo/application/public/interfaces", |
| "//mojo/common", |
| "//mojo/public/cpp/bindings", |
| "//mojo/services/network/public/interfaces", |
| "//mojo/services/updater", |
| "//url", |
| ] |
| deps = [ |
| "//base/third_party/dynamic_annotations", |
| "//crypto:crypto", |
| "//mojo/application/public/cpp:sources", |
| "//mojo/environment:chromium", |
| "//mojo/util:filename_util", |
| "//third_party/mojo/src/mojo/edk/system", |
| "//url", |
| ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "capability_filter_test.cc", |
| "capability_filter_test.h", |
| "test_package_manager.cc", |
| "test_package_manager.h", |
| ] |
| |
| deps = [ |
| ":shell", |
| ":test_bindings", |
| "//mojo/application/public/cpp", |
| "//mojo/application/public/interfaces", |
| "//testing/gtest", |
| ] |
| } |
| |
| test("mojo_shell_unittests") { |
| sources = [ |
| "../fetcher/about_fetcher_unittest.cc", |
| "../fetcher/data_fetcher_unittest.cc", |
| "../fetcher/network_fetcher_unittest.cc", |
| "../fetcher/url_resolver_unittest.cc", |
| "application_manager_unittest.cc", |
| "capability_filter_unittest.cc", |
| "data_pipe_peek_unittest.cc", |
| "query_util_unittest.cc", |
| ] |
| |
| deps = [ |
| ":shell", |
| ":test_bindings", |
| ":test_support", |
| "//base", |
| "//mojo/application/public/cpp", |
| "//mojo/fetcher", |
| "//mojo/package_manager", |
| "//mojo/public/cpp/system", |
| "//mojo/util:filename_util", |
| "//testing/gtest", |
| "//third_party/mojo/src/mojo/edk/test:run_all_unittests", |
| "//url", |
| ] |
| } |
| |
| mojom("test_bindings") { |
| sources = [ |
| "application_manager_apptests.mojom", |
| "capability_filter_unittest.mojom", |
| "test.mojom", |
| ] |
| } |
| |
| mojo_native_application("apptests") { |
| output_name = "mojo_shell_apptests" |
| testonly = true |
| |
| sources = [ |
| "application_manager_apptest.cc", |
| ] |
| |
| deps = [ |
| ":test_bindings", |
| "//base", |
| "//base/test:test_config", |
| "//mojo/application/public/cpp:sources", |
| "//mojo/application/public/cpp:test_support", |
| "//mojo/common:common_base", |
| "//mojo/converters/network", |
| ] |
| |
| data_deps = [ |
| ":application_manager_apptest_driver", |
| ":application_manager_apptest_target", |
| ] |
| } |
| |
| executable("application_manager_apptest_driver") { |
| testonly = true |
| |
| sources = [ |
| "application_manager_apptest_driver.cc", |
| ] |
| |
| deps = [ |
| ":test_bindings", |
| "//base", |
| "//base:base_static", |
| "//mojo/application/public/cpp", |
| "//mojo/application/public/interfaces", |
| "//mojo/common:common_base", |
| "//mojo/converters/network", |
| "//mojo/runner:init", |
| "//mojo/runner/child:test_native_main", |
| "//third_party/mojo/src/mojo/edk/system", |
| ] |
| } |
| |
| executable("application_manager_apptest_target") { |
| testonly = true |
| |
| sources = [ |
| "application_manager_apptest_target.cc", |
| ] |
| |
| deps = [ |
| ":test_bindings", |
| "//base", |
| "//mojo/application/public/cpp", |
| "//mojo/common:common_base", |
| "//mojo/converters/network", |
| "//mojo/runner/child:test_native_main", |
| ] |
| } |