From 8579fe019ca8c4ce9f942144b3ffb33e04f356a7 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Thu, 16 Jan 2014 23:51:10 +0000 Subject: [PATCH] Mojo: Move test_embedder.* to the mojo_system_impl component. Also, tighten up DEPS: things outside mojo/system/ shouldn't include things in mojo/system/, unless they're an embedder in which case they can include things in mojo/system/embedder/. R=sky@chromium.org Review URL: https://codereview.chromium.org/136473007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245381 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/DEPS | 1 + mojo/mojo.gyp | 10 ++++++---- mojo/shell/DEPS | 1 + mojo/system/embedder/test_embedder.h | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mojo/DEPS b/mojo/DEPS index 1bdd15207cda48..7a95e2bb98bb73 100644 --- a/mojo/DEPS +++ b/mojo/DEPS @@ -2,6 +2,7 @@ include_rules = [ "+base", "+build", "+mojo", + "-mojo/system", "+mojom", "+testing", ] diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp index 0c7580efa84221..5a64fd7c926b4e 100644 --- a/mojo/mojo.gyp +++ b/mojo/mojo.gyp @@ -140,6 +140,12 @@ 'system/waiter.h', 'system/waiter_list.cc', 'system/waiter_list.h', + # Test-only code: + # TODO(vtl): It's a little unfortunate that these end up in the same + # component as non-test-only code. In the static build, this code should + # hopefully be dead-stripped. + 'system/embedder/test_embedder.cc', + 'system/embedder/test_embedder.h', ], }, { @@ -166,10 +172,6 @@ 'system/raw_channel_posix_unittest.cc', 'system/remote_message_pipe_posix_unittest.cc', 'system/simple_dispatcher_unittest.cc', - # TODO(vtl): Move this to mojo_system_impl (and mojo_system_impl's - # exports). - 'system/embedder/test_embedder.cc', - 'system/embedder/test_embedder.h', 'system/test_utils.cc', 'system/test_utils.h', 'system/waiter_list_unittest.cc', diff --git a/mojo/shell/DEPS b/mojo/shell/DEPS index 4b4f60b23df411..fb5bed997df6f1 100644 --- a/mojo/shell/DEPS +++ b/mojo/shell/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+mojo/system/embedder", "+net", "+ui/gl", ] diff --git a/mojo/system/embedder/test_embedder.h b/mojo/system/embedder/test_embedder.h index 3db76b791a89e2..bafae5c63bb734 100644 --- a/mojo/system/embedder/test_embedder.h +++ b/mojo/system/embedder/test_embedder.h @@ -5,6 +5,8 @@ #ifndef MOJO_SYSTEM_EMBEDDER_TEST_EMBEDDER_H_ #define MOJO_SYSTEM_EMBEDDER_TEST_EMBEDDER_H_ +#include "mojo/system/system_impl_export.h" + namespace mojo { namespace embedder { namespace test { @@ -12,9 +14,7 @@ namespace test { // This shuts down the global, singleton instance. (Note: "Real" embedders are // not expected to ever shut down this instance. This |Shutdown()| function will // do more work to ensure that tests don't leak, etc.) -// TODO(vtl): Figure out the library/component/DLL/export situation for test -// embedder stuff. For now, it's linked directly into the unit test binary. -void Shutdown(); +MOJO_SYSTEM_IMPL_EXPORT void Shutdown(); } // namespace test } // namespace embedder