Skip to content

Commit

Permalink
GN: Add mojo_shell_tests, get more things working on android
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jamesr@chromium.org committed Aug 13, 2014
1 parent 4bf1d74 commit b1867c9
Show file tree
Hide file tree
Showing 17 changed files with 177 additions and 55 deletions.
8 changes: 3 additions & 5 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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",

Expand All @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion content/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions mojo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ group("mojo") {
"//mojo/public",
"//mojo/services",
"//mojo/shell:mojo_shell",
"//mojo/shell:mojo_shell_tests",
]
}

Expand Down
4 changes: 2 additions & 2 deletions mojo/environment/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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/*"
Expand Down
25 changes: 21 additions & 4 deletions mojo/gles2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions mojo/mojo.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
],
},
{
# GN version: //mojo/shell:mojo_shell_tests
'target_name': 'mojo_shell_tests',
'type': '<(gtest_target_type)',
'dependencies': [
Expand Down
1 change: 1 addition & 0 deletions mojo/mojo_public.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
],
},
{
# GN version: //mojo/public/cpp/application:standalone"
'target_name': 'mojo_application_standalone',
'type': 'static_library',
'sources': [
Expand Down
6 changes: 2 additions & 4 deletions mojo/services/native_viewport/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" ]

Expand Down Expand Up @@ -56,8 +58,4 @@ component("native_viewport") {
if (use_ozone) {
sources += [ "native_viewport_ozone.cc" ]
}

if (is_component_build) {
deps += [ "//mojo/system" ]
}
}
7 changes: 3 additions & 4 deletions mojo/services/public/cpp/geometry/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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" ]

Expand All @@ -24,8 +27,4 @@ component("geometry") {
"geometry_type_converters.h",
"mojo_geometry_export.h",
]

if (is_component_build) {
deps += [ "//mojo/system" ]
}
}
7 changes: 3 additions & 4 deletions mojo/services/public/cpp/input_events/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -22,8 +25,4 @@ component("input_events") {
"input_events_type_converters.h",
"mojo_input_events_export.h",
]

if (is_component_build) {
deps += [ "//mojo/system" ]
}
}
49 changes: 49 additions & 0 deletions mojo/services/test_service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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",
]
}
7 changes: 3 additions & 4 deletions mojo/services/view_manager/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -30,6 +32,7 @@ component("view_manager") {
"//ui/gl",
"//webkit/common/gpu",
]
deps += mojo_system_for_component

defines = [
"MOJO_VIEW_MANAGER_IMPLEMENTATION",
Expand Down Expand Up @@ -66,8 +69,4 @@ component("view_manager") {
"window_tree_host_impl.cc",
"window_tree_host_impl.h",
]

if (is_component_build) {
deps += [ "//mojo/system" ]
}
}
43 changes: 41 additions & 2 deletions mojo/shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
]
Expand All @@ -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',
]
}
}
Loading

0 comments on commit b1867c9

Please sign in to comment.