0

GN: Add mojo_shell_tests, get more things working on android

R=brettw@chromium.org

Review URL: https://codereview.chromium.org/461903002

Cr-Commit-Position: refs/heads/master@{#289133}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289133 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
jamesr@chromium.org
2014-08-13 00:22:04 +00:00
parent 4bf1d748ac
commit b1867c911e
17 changed files with 177 additions and 55 deletions
BUILD.gn
content
browser
renderer
mojo
BUILD.gn
environment
gles2
mojo.gypmojo_public.gypi
services
native_viewport
public
cpp
geometry
input_events
test_service
view_manager
shell
system.gni
third_party
libxslt
zlib

@ -162,7 +162,6 @@ group("root") {
]
deps -= [
"//cc",
"//chrome/browser", # Blocked on content.
"//chrome/browser/devtools", # Blocked on content.
"//chrome/browser/ui", # Blocked on content.
@ -179,13 +178,15 @@ group("root") {
"//extensions/common",
"//extensions/common/api",
"//extensions/renderer",
"//mojo", # Blocked on GN toolchain support: https://codereview.chromium.org/428633006/
"//pdf", # Not compiled on Android in GYP yet, either.
"//ppapi:ppapi_c",
"//sandbox",
"//third_party/libusb",
"//ui/keyboard", # Blocked on content.
# Blocked on neon stuff in vp8
"//third_party/WebKit/public:all_blink",
# Seems to not be compiled on Android. Otherwise it will need a config.h.
"//third_party/libxslt",
@ -201,9 +202,6 @@ group("root") {
"//third_party/flac",
"//breakpad:symupload",
# TODO(brettw) make Blink work on Android.
"//third_party/WebKit/public:all_blink",
# Not tested on Android yet:
"//google_apis/gcm",
"//third_party/cld_2",

@ -379,16 +379,16 @@ source_set("browser") {
"compositor/software_output_device_x11.h",
]
}
deps += [ "//ui/compositor" ]
}
if (!use_ozone) {
sources -= [
"compositor/overlay_candidate_validator_ozone.cc",
"compositor/overlay_candidate_validator_ozone.h",
"compositor/software_output_device_ozone.cc",
"compositor/software_output_device_ozone.h",
]
if (!use_ozone) {
sources -= [
"compositor/overlay_candidate_validator_ozone.cc",
"compositor/overlay_candidate_validator_ozone.h",
"compositor/software_output_device_ozone.cc",
"compositor/software_output_device_ozone.h",
]
}
deps += [ "//ui/compositor" ]
}
if (enable_web_speech) {

@ -111,7 +111,6 @@ source_set("renderer") {
"media/media_stream_audio_renderer.cc",
"media/media_stream_audio_renderer.h",
"media/media_stream_center.h",
"media/media_stream_client.h",
"media/media_stream_constraints_util.cc",
"media/media_stream_constraints_util.h",
"media/media_stream_dispatcher.h",

@ -8,6 +8,7 @@ group("mojo") {
"//mojo/public",
"//mojo/services",
"//mojo/shell:mojo_shell",
"//mojo/shell:mojo_shell_tests",
]
}

@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# GYP version: mojo.gyp:mojo_environment_chromium
# GYP version: mojo_base.gyp:mojo_environment_chromium
source_set("chromium") {
output_name = "mojo_environment_chromium"
@ -22,7 +22,7 @@ source_set("chromium") {
]
}
# GYP version: mojo.gyp:mojo_environment_chromium_impl
# GYP version: mojo_base.gyp:mojo_environment_chromium_impl
component("chromium_impl") {
output_name = "mojo_environment_impl"
visibility = "//mojo/*"

@ -3,7 +3,17 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
import("//mojo/system.gni")
config("mojo_use_gles2") {
defines = [ "MOJO_USE_GLES2_IMPL" ]
}
config("gles2_use_mojo") {
defines = [ "USE_MOJO_GLES2" ]
}
# GYP version: mojo/mojo_base.gyp:mojo_gles2_impl
component("gles2") {
output_name = "mojo_gles2_impl"
@ -18,12 +28,19 @@ component("gles2") {
"//mojo/services/gles2:interfaces",
"//mojo/environment:chromium",
]
deps += mojo_system_for_component
if (is_component_build) {
deps += [ "//mojo/system" ]
}
defines = [
"MOJO_GLES2_IMPL_IMPLEMENTATION",
"MOJO_GLES2_IMPLEMENTATION",
]
defines = [ "MOJO_GLES2_IMPL_IMPLEMENTATION" ]
configs += [
":gles2_use_mojo",
":mojo_use_gles2",
]
direct_dependent_configs = [ ":gles2_use_mojo" ]
all_dependent_configs = [ ":mojo_use_gles2" ]
sources = [
"command_buffer_client_impl.cc",

@ -263,6 +263,7 @@
],
},
{
# GN version: //mojo/shell:mojo_shell_tests
'target_name': 'mojo_shell_tests',
'type': '<(gtest_target_type)',
'dependencies': [

@ -251,6 +251,7 @@
],
},
{
# GN version: //mojo/public/cpp/application:standalone"
'target_name': 'mojo_application_standalone',
'type': 'static_library',
'sources': [

@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//mojo/system.gni")
component("native_viewport") {
output_name = "mojo_native_viewport"
@ -21,6 +22,7 @@ component("native_viewport") {
"//mojo/services/public/cpp/input_events",
"//mojo/services/public/interfaces/native_viewport",
]
deps += mojo_system_for_component
defines = [ "MOJO_NATIVE_VIEWPORT_IMPLEMENTATION" ]
@ -56,8 +58,4 @@ component("native_viewport") {
if (use_ozone) {
sources += [ "native_viewport_ozone.cc" ]
}
if (is_component_build) {
deps += [ "//mojo/system" ]
}
}

@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/system.gni")
component("geometry") {
output_name = "mojo_geometry_lib"
@ -12,6 +14,7 @@ component("geometry") {
"//mojo/environment:chromium",
"//mojo/services/public/interfaces/geometry",
]
deps += mojo_system_for_component
forward_dependent_configs_from = [ "//ui/gfx" ]
@ -24,8 +27,4 @@ component("geometry") {
"geometry_type_converters.h",
"mojo_geometry_export.h",
]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
}

@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/system.gni")
component("input_events") {
deps = [
"//base",
@ -12,6 +14,7 @@ component("input_events") {
"//mojo/services/public/interfaces/geometry",
"//mojo/services/public/cpp/geometry",
]
deps += mojo_system_for_component
defines = [
"MOJO_INPUT_EVENTS_IMPLEMENTATION",
@ -22,8 +25,4 @@ component("input_events") {
"input_events_type_converters.h",
"mojo_input_events_export.h",
]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
}

@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
import("//mojo/system.gni")
# GYP version: mojo/mojo_services.gypi:mojo_test_service_bindings
mojom("bindings") {
@ -11,3 +12,51 @@ mojom("bindings") {
"test_service.mojom",
]
}
# GYP version: mojo/mojo_services.gypi:mojo_test_app
shared_library("mojo_test_app") {
deps = [
":bindings",
"//base",
"//mojo/public/cpp/application:main_standalone",
"//mojo/public/cpp/application:standalone",
"//mojo/public/cpp/environment:standalone",
"//mojo/public/cpp/utility",
]
deps += mojo_system_for_shared_library
sources = [
"test_request_tracker_client_impl.cc",
"test_request_tracker_client_impl.h",
"test_service_application.cc",
"test_service_application.h",
"test_service_impl.cc",
"test_service_impl.h",
"test_time_service_impl.cc",
"test_time_service_impl.h",
]
}
# GYP version: //mojo/mojo_services.gypi:mojo_test_request_tracker_app
shared_library("mojo_test_request_tracker_app") {
deps = [
":bindings",
"//base",
"//mojo/public/cpp/application:main_standalone",
"//mojo/public/cpp/application:standalone",
"//mojo/public/cpp/environment:standalone",
"//mojo/public/cpp/utility",
]
deps += mojo_system_for_shared_library
sources = [
"test_request_tracker_client_impl.cc",
"test_request_tracker_client_impl.h",
"test_request_tracker_application.cc",
"test_request_tracker_application.h",
"test_time_service_impl.cc",
"test_time_service_impl.h",
"test_request_tracker_impl.cc",
"test_request_tracker_impl.h",
]
}

@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/system.gni")
component("view_manager") {
deps = [
"//base",
@ -30,6 +32,7 @@ component("view_manager") {
"//ui/gl",
"//webkit/common/gpu",
]
deps += mojo_system_for_component
defines = [
"MOJO_VIEW_MANAGER_IMPLEMENTATION",
@ -66,8 +69,4 @@ component("view_manager") {
"window_tree_host_impl.cc",
"window_tree_host_impl.h",
]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
}

@ -33,11 +33,12 @@ source_set("lib") {
"//base",
"//base/third_party/dynamic_annotations",
"//base:base_static",
"//mojo/application_manager",
"//mojo/common",
"//mojo/gles2",
"//mojo/public/cpp/application:chromium",
"//mojo/public/gles2",
"//mojo/public/interfaces/application",
"//mojo/application_manager",
"//mojo/services/native_viewport",
"//mojo/services/public/interfaces/native_viewport",
"//mojo/services/public/interfaces/network",
@ -102,7 +103,6 @@ source_set("lib") {
deps += [
# These are only necessary as long as we hard code use of ViewManager.
"//skia",
"//mojo/public/gles2",
"//mojo/services/view_manager",
"//mojo/services/public/interfaces/view_manager",
]
@ -124,3 +124,42 @@ mojom("external_service_bindings") {
"external_service.mojom"
]
}
test("mojo_shell_tests") {
deps = [
":lib",
"//base",
"//base:i18n",
"//base/test:test_support",
"//testing/gtest",
"//net:test_support",
"//url",
"//mojo/application_manager",
"//mojo/services/test_service:bindings",
"//mojo/common",
"//mojo/environment:chromium",
"//mojo/system",
]
datadeps = [
"//mojo/services/test_service:mojo_test_app",
"//mojo/services/test_service:mojo_test_request_tracker_app",
]
sources = [
"child_process_host_unittest.cc",
"dynamic_application_loader_unittest.cc",
"in_process_dynamic_service_runner_unittest.cc",
"shell_test_base.cc",
"shell_test_base.h",
"shell_test_base_unittest.cc",
"shell_test_main.cc",
]
if (is_android) {
deps += [
# TODO(GYP):
#'../testing/android/native_test.gyp:native_test_native_code',
]
}
}

24
mojo/system.gni Normal file

@ -0,0 +1,24 @@
# 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.
# The following mojo_system-prefixed variables are used to express a dependency
# on the mojo system APIs.
#
# In an is_component_build build, everything can link against
# mojo_system_impl because it is built as a shared library. However, in a static
# build, mojo_system_impl is linked into an executable (e.g.,
# mojo_shell), and must be injected into other shared libraries (i.e., Mojo
# Apps) that need the mojo system API.
#
# For component targets, add mojo_system_for_component to your deps section.
# For shared_library targets (e.g., a Mojo App), add
# mojo_system_for_shared_library to your deps
if (is_component_build) {
mojo_system_for_component = [ "//mojo/system" ]
mojo_system_for_shared_library = [ "//mojo/system" ]
} else {
mojo_system_for_component = [] # nothing to link against here
mojo_system_for_shared_library = [ "//mojo/public/c/system" ]
}

@ -62,7 +62,7 @@ static_library("libxslt") {
configs += [ "//build/config/compiler:no_chromium_code" ]
direct_dependent_configs = [ ":libxslt_config" ]
if (is_linux) {
if (is_linux || is_android) {
include_dirs = [ "linux" ]
} else if (is_win) {
include_dirs = [ "win32" ]

@ -84,19 +84,17 @@ static_library("minizip") {
direct_dependent_configs = [ ":zlib_config" ]
}
if (!is_android) {
static_library("zip") {
sources = [
"google/zip.cc",
"google/zip.h",
"google/zip_internal.cc",
"google/zip_internal.h",
"google/zip_reader.cc",
"google/zip_reader.h",
]
deps = [
":minizip",
"//base",
]
}
static_library("zip") {
sources = [
"google/zip.cc",
"google/zip.h",
"google/zip_internal.cc",
"google/zip_internal.h",
"google/zip_reader.cc",
"google/zip_reader.h",
]
deps = [
":minizip",
"//base",
]
}