Commit b1867c91 authored by jamesr@chromium.org's avatar jamesr@chromium.org

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
parent 4bf1d748
...@@ -162,7 +162,6 @@ group("root") { ...@@ -162,7 +162,6 @@ group("root") {
] ]
deps -= [ deps -= [
"//cc",
"//chrome/browser", # Blocked on content. "//chrome/browser", # Blocked on content.
"//chrome/browser/devtools", # Blocked on content. "//chrome/browser/devtools", # Blocked on content.
"//chrome/browser/ui", # Blocked on content. "//chrome/browser/ui", # Blocked on content.
...@@ -179,13 +178,15 @@ group("root") { ...@@ -179,13 +178,15 @@ group("root") {
"//extensions/common", "//extensions/common",
"//extensions/common/api", "//extensions/common/api",
"//extensions/renderer", "//extensions/renderer",
"//mojo", # Blocked on GN toolchain support: https://codereview.chromium.org/428633006/
"//pdf", # Not compiled on Android in GYP yet, either. "//pdf", # Not compiled on Android in GYP yet, either.
"//ppapi:ppapi_c", "//ppapi:ppapi_c",
"//sandbox", "//sandbox",
"//third_party/libusb", "//third_party/libusb",
"//ui/keyboard", # Blocked on content. "//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. # Seems to not be compiled on Android. Otherwise it will need a config.h.
"//third_party/libxslt", "//third_party/libxslt",
...@@ -201,9 +202,6 @@ group("root") { ...@@ -201,9 +202,6 @@ group("root") {
"//third_party/flac", "//third_party/flac",
"//breakpad:symupload", "//breakpad:symupload",
# TODO(brettw) make Blink work on Android.
"//third_party/WebKit/public:all_blink",
# Not tested on Android yet: # Not tested on Android yet:
"//google_apis/gcm", "//google_apis/gcm",
"//third_party/cld_2", "//third_party/cld_2",
......
...@@ -379,8 +379,6 @@ source_set("browser") { ...@@ -379,8 +379,6 @@ source_set("browser") {
"compositor/software_output_device_x11.h", "compositor/software_output_device_x11.h",
] ]
} }
deps += [ "//ui/compositor" ]
}
if (!use_ozone) { if (!use_ozone) {
sources -= [ sources -= [
...@@ -390,6 +388,8 @@ source_set("browser") { ...@@ -390,6 +388,8 @@ source_set("browser") {
"compositor/software_output_device_ozone.h", "compositor/software_output_device_ozone.h",
] ]
} }
deps += [ "//ui/compositor" ]
}
if (enable_web_speech) { if (enable_web_speech) {
deps += [ deps += [
......
...@@ -111,7 +111,6 @@ source_set("renderer") { ...@@ -111,7 +111,6 @@ source_set("renderer") {
"media/media_stream_audio_renderer.cc", "media/media_stream_audio_renderer.cc",
"media/media_stream_audio_renderer.h", "media/media_stream_audio_renderer.h",
"media/media_stream_center.h", "media/media_stream_center.h",
"media/media_stream_client.h",
"media/media_stream_constraints_util.cc", "media/media_stream_constraints_util.cc",
"media/media_stream_constraints_util.h", "media/media_stream_constraints_util.h",
"media/media_stream_dispatcher.h", "media/media_stream_dispatcher.h",
......
...@@ -8,6 +8,7 @@ group("mojo") { ...@@ -8,6 +8,7 @@ group("mojo") {
"//mojo/public", "//mojo/public",
"//mojo/services", "//mojo/services",
"//mojo/shell:mojo_shell", "//mojo/shell:mojo_shell",
"//mojo/shell:mojo_shell_tests",
] ]
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# GYP version: mojo.gyp:mojo_environment_chromium # GYP version: mojo_base.gyp:mojo_environment_chromium
source_set("chromium") { source_set("chromium") {
output_name = "mojo_environment_chromium" output_name = "mojo_environment_chromium"
...@@ -22,7 +22,7 @@ source_set("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") { component("chromium_impl") {
output_name = "mojo_environment_impl" output_name = "mojo_environment_impl"
visibility = "//mojo/*" visibility = "//mojo/*"
......
...@@ -3,7 +3,17 @@ ...@@ -3,7 +3,17 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni") 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") { component("gles2") {
output_name = "mojo_gles2_impl" output_name = "mojo_gles2_impl"
...@@ -18,12 +28,19 @@ component("gles2") { ...@@ -18,12 +28,19 @@ component("gles2") {
"//mojo/services/gles2:interfaces", "//mojo/services/gles2:interfaces",
"//mojo/environment:chromium", "//mojo/environment:chromium",
] ]
deps += mojo_system_for_component
if (is_component_build) { defines = [
deps += [ "//mojo/system" ] "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 = [ sources = [
"command_buffer_client_impl.cc", "command_buffer_client_impl.cc",
......
...@@ -263,6 +263,7 @@ ...@@ -263,6 +263,7 @@
], ],
}, },
{ {
# GN version: //mojo/shell:mojo_shell_tests
'target_name': 'mojo_shell_tests', 'target_name': 'mojo_shell_tests',
'type': '<(gtest_target_type)', 'type': '<(gtest_target_type)',
'dependencies': [ 'dependencies': [
......
...@@ -251,6 +251,7 @@ ...@@ -251,6 +251,7 @@
], ],
}, },
{ {
# GN version: //mojo/public/cpp/application:standalone"
'target_name': 'mojo_application_standalone', 'target_name': 'mojo_application_standalone',
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//mojo/system.gni")
component("native_viewport") { component("native_viewport") {
output_name = "mojo_native_viewport" output_name = "mojo_native_viewport"
...@@ -21,6 +22,7 @@ component("native_viewport") { ...@@ -21,6 +22,7 @@ component("native_viewport") {
"//mojo/services/public/cpp/input_events", "//mojo/services/public/cpp/input_events",
"//mojo/services/public/interfaces/native_viewport", "//mojo/services/public/interfaces/native_viewport",
] ]
deps += mojo_system_for_component
defines = [ "MOJO_NATIVE_VIEWPORT_IMPLEMENTATION" ] defines = [ "MOJO_NATIVE_VIEWPORT_IMPLEMENTATION" ]
...@@ -56,8 +58,4 @@ component("native_viewport") { ...@@ -56,8 +58,4 @@ component("native_viewport") {
if (use_ozone) { if (use_ozone) {
sources += [ "native_viewport_ozone.cc" ] sources += [ "native_viewport_ozone.cc" ]
} }
if (is_component_build) {
deps += [ "//mojo/system" ]
}
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//mojo/system.gni")
component("geometry") { component("geometry") {
output_name = "mojo_geometry_lib" output_name = "mojo_geometry_lib"
...@@ -12,6 +14,7 @@ component("geometry") { ...@@ -12,6 +14,7 @@ component("geometry") {
"//mojo/environment:chromium", "//mojo/environment:chromium",
"//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/geometry",
] ]
deps += mojo_system_for_component
forward_dependent_configs_from = [ "//ui/gfx" ] forward_dependent_configs_from = [ "//ui/gfx" ]
...@@ -24,8 +27,4 @@ component("geometry") { ...@@ -24,8 +27,4 @@ component("geometry") {
"geometry_type_converters.h", "geometry_type_converters.h",
"mojo_geometry_export.h", "mojo_geometry_export.h",
] ]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//mojo/system.gni")
component("input_events") { component("input_events") {
deps = [ deps = [
"//base", "//base",
...@@ -12,6 +14,7 @@ component("input_events") { ...@@ -12,6 +14,7 @@ component("input_events") {
"//mojo/services/public/interfaces/geometry", "//mojo/services/public/interfaces/geometry",
"//mojo/services/public/cpp/geometry", "//mojo/services/public/cpp/geometry",
] ]
deps += mojo_system_for_component
defines = [ defines = [
"MOJO_INPUT_EVENTS_IMPLEMENTATION", "MOJO_INPUT_EVENTS_IMPLEMENTATION",
...@@ -22,8 +25,4 @@ component("input_events") { ...@@ -22,8 +25,4 @@ component("input_events") {
"input_events_type_converters.h", "input_events_type_converters.h",
"mojo_input_events_export.h", "mojo_input_events_export.h",
] ]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
} }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni") import("//mojo/public/tools/bindings/mojom.gni")
import("//mojo/system.gni")
# GYP version: mojo/mojo_services.gypi:mojo_test_service_bindings # GYP version: mojo/mojo_services.gypi:mojo_test_service_bindings
mojom("bindings") { mojom("bindings") {
...@@ -11,3 +12,51 @@ mojom("bindings") { ...@@ -11,3 +12,51 @@ mojom("bindings") {
"test_service.mojom", "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 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//mojo/system.gni")
component("view_manager") { component("view_manager") {
deps = [ deps = [
"//base", "//base",
...@@ -30,6 +32,7 @@ component("view_manager") { ...@@ -30,6 +32,7 @@ component("view_manager") {
"//ui/gl", "//ui/gl",
"//webkit/common/gpu", "//webkit/common/gpu",
] ]
deps += mojo_system_for_component
defines = [ defines = [
"MOJO_VIEW_MANAGER_IMPLEMENTATION", "MOJO_VIEW_MANAGER_IMPLEMENTATION",
...@@ -66,8 +69,4 @@ component("view_manager") { ...@@ -66,8 +69,4 @@ component("view_manager") {
"window_tree_host_impl.cc", "window_tree_host_impl.cc",
"window_tree_host_impl.h", "window_tree_host_impl.h",
] ]
if (is_component_build) {
deps += [ "//mojo/system" ]
}
} }
...@@ -33,11 +33,12 @@ source_set("lib") { ...@@ -33,11 +33,12 @@ source_set("lib") {
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//base:base_static", "//base:base_static",
"//mojo/application_manager",
"//mojo/common", "//mojo/common",
"//mojo/gles2", "//mojo/gles2",
"//mojo/public/cpp/application:chromium", "//mojo/public/cpp/application:chromium",
"//mojo/public/gles2",
"//mojo/public/interfaces/application", "//mojo/public/interfaces/application",
"//mojo/application_manager",
"//mojo/services/native_viewport", "//mojo/services/native_viewport",
"//mojo/services/public/interfaces/native_viewport", "//mojo/services/public/interfaces/native_viewport",
"//mojo/services/public/interfaces/network", "//mojo/services/public/interfaces/network",
...@@ -102,7 +103,6 @@ source_set("lib") { ...@@ -102,7 +103,6 @@ source_set("lib") {
deps += [ deps += [
# These are only necessary as long as we hard code use of ViewManager. # These are only necessary as long as we hard code use of ViewManager.
"//skia", "//skia",
"//mojo/public/gles2",
"//mojo/services/view_manager", "//mojo/services/view_manager",
"//mojo/services/public/interfaces/view_manager", "//mojo/services/public/interfaces/view_manager",
] ]
...@@ -124,3 +124,42 @@ mojom("external_service_bindings") { ...@@ -124,3 +124,42 @@ mojom("external_service_bindings") {
"external_service.mojom" "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',
]
}
}
# 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") { ...@@ -62,7 +62,7 @@ static_library("libxslt") {
configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ]
direct_dependent_configs = [ ":libxslt_config" ] direct_dependent_configs = [ ":libxslt_config" ]
if (is_linux) { if (is_linux || is_android) {
include_dirs = [ "linux" ] include_dirs = [ "linux" ]
} else if (is_win) { } else if (is_win) {
include_dirs = [ "win32" ] include_dirs = [ "win32" ]
......
...@@ -84,8 +84,7 @@ static_library("minizip") { ...@@ -84,8 +84,7 @@ static_library("minizip") {
direct_dependent_configs = [ ":zlib_config" ] direct_dependent_configs = [ ":zlib_config" ]
} }
if (!is_android) { static_library("zip") {
static_library("zip") {
sources = [ sources = [
"google/zip.cc", "google/zip.cc",
"google/zip.h", "google/zip.h",
...@@ -98,5 +97,4 @@ if (!is_android) { ...@@ -98,5 +97,4 @@ if (!is_android) {
":minizip", ":minizip",
"//base", "//base",
] ]
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment