summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn2
-rw-r--r--mojo/BUILD.gn4
-rw-r--r--mojo/mojo_shell.gyp8
-rw-r--r--mojo/shell/BUILD.gn172
-rw-r--r--mojo/shell/tests/BUILD.gn186
-rw-r--r--mojo/shell/tests/application_manager_apptest.cc (renamed from mojo/shell/application_manager_apptest.cc)2
-rw-r--r--mojo/shell/tests/application_manager_apptest_driver.cc (renamed from mojo/shell/application_manager_apptest_driver.cc)0
-rw-r--r--mojo/shell/tests/application_manager_apptest_driver_manifest.json (renamed from mojo/shell/application_manager_apptest_driver_manifest.json)0
-rw-r--r--mojo/shell/tests/application_manager_apptest_manifest.json (renamed from mojo/shell/application_manager_apptest_manifest.json)0
-rw-r--r--mojo/shell/tests/application_manager_apptest_target.cc (renamed from mojo/shell/application_manager_apptest_target.cc)2
-rw-r--r--mojo/shell/tests/application_manager_apptests.mojom (renamed from mojo/shell/application_manager_apptests.mojom)0
-rw-r--r--mojo/shell/tests/application_manager_unittest.cc (renamed from mojo/shell/application_manager_unittest.cc)2
-rw-r--r--mojo/shell/tests/capability_filter_test.cc (renamed from mojo/shell/capability_filter_test.cc)2
-rw-r--r--mojo/shell/tests/capability_filter_test.h (renamed from mojo/shell/capability_filter_test.h)2
-rw-r--r--mojo/shell/tests/capability_filter_unittest.cc (renamed from mojo/shell/capability_filter_unittest.cc)2
-rw-r--r--mojo/shell/tests/capability_filter_unittest.mojom (renamed from mojo/shell/capability_filter_unittest.mojom)0
-rw-r--r--mojo/shell/tests/package_apptest.cc (renamed from mojo/shell/package_apptest.cc)2
-rw-r--r--mojo/shell/tests/package_test.mojom (renamed from mojo/shell/package_test.mojom)0
-rw-r--r--mojo/shell/tests/package_test_app_a_manifest.json (renamed from mojo/shell/package_test_app_a_manifest.json)0
-rw-r--r--mojo/shell/tests/package_test_app_b_manifest.json (renamed from mojo/shell/package_test_app_b_manifest.json)0
-rw-r--r--mojo/shell/tests/package_test_package.cc (renamed from mojo/shell/package_test_package.cc)0
-rw-r--r--mojo/shell/tests/package_test_package_manifest.json (renamed from mojo/shell/package_test_package_manifest.json)0
-rw-r--r--mojo/shell/tests/test.mojom (renamed from mojo/shell/test.mojom)0
23 files changed, 200 insertions, 186 deletions
diff --git a/BUILD.gn b/BUILD.gn
index d1a85b1..30d6b69 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -603,7 +603,7 @@ group("mojo_apptests") {
"//mash/wm:tests",
"//media/mojo/services:tests",
"//mojo/services/network:apptests",
- "//mojo/shell:apptests",
+ "//mojo/shell/tests:apptests",
"//ui/views/mus:tests",
]
}
diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn
index e5e15a3..2fdc992 100644
--- a/mojo/BUILD.gn
+++ b/mojo/BUILD.gn
@@ -43,10 +43,10 @@ group("tests") {
"//mojo/edk/test:mojo_public_system_unittests",
"//mojo/edk/test:mojo_public_utility_unittests",
"//mojo/services/network:apptests",
- "//mojo/shell:apptests",
- "//mojo/shell:mojo_shell_unittests",
"//mojo/shell/public/cpp/tests:mojo_public_application_unittests",
"//mojo/shell/runner/host:mojo_runner_host_unittests",
+ "//mojo/shell/tests:apptests",
+ "//mojo/shell/tests:mojo_shell_unittests",
]
if (is_android) {
diff --git a/mojo/mojo_shell.gyp b/mojo/mojo_shell.gyp
index 16fb9b4..f676116 100644
--- a/mojo/mojo_shell.gyp
+++ b/mojo/mojo_shell.gyp
@@ -50,8 +50,8 @@
'target_name': 'mojo_shell_unittests',
'type': 'executable',
'sources': [
- 'shell/application_manager_unittest.cc',
- 'shell/capability_filter_unittest.cc',
+ 'shell/tests/application_manager_unittest.cc',
+ 'shell/tests/capability_filter_unittest.cc',
],
'dependencies': [
'<(DEPTH)/mojo/mojo_shell.gyp:mojo_shell_lib',
@@ -71,8 +71,8 @@
'type': 'static_library',
'variables': {
'mojom_files': [
- 'shell/capability_filter_unittest.mojom',
- 'shell/test.mojom',
+ 'shell/tests/capability_filter_unittest.mojom',
+ 'shell/tests/test.mojom',
],
},
'includes': [
diff --git a/mojo/shell/BUILD.gn b/mojo/shell/BUILD.gn
index 4782614..739c133 100644
--- a/mojo/shell/BUILD.gn
+++ b/mojo/shell/BUILD.gn
@@ -2,8 +2,6 @@
# 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/mojo_application_manifest.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//testing/test.gni")
@@ -66,173 +64,3 @@ source_set("shell") {
# For mojo/shell/application_loader.h
allow_circular_includes_from = [ "//mojo/services/package_manager:lib" ]
}
-
-source_set("test_support") {
- testonly = true
- sources = [
- "capability_filter_test.cc",
- "capability_filter_test.h",
- ]
-
- deps = [
- ":shell",
- ":test_bindings",
- "//mojo/shell/public/cpp",
- "//mojo/shell/public/interfaces",
- "//testing/gtest",
- ]
-}
-
-# TODO(beng): this target should just be called "unittests" but I am having
-# difficulty with the android _apk generator.
-test("mojo_shell_unittests") {
- sources = [
- "application_manager_unittest.cc",
- "capability_filter_unittest.cc",
- ]
-
- deps = [
- ":shell",
- ":test_bindings",
- ":test_support",
- "//base",
- "//mojo/edk/system:test_utils",
- "//mojo/edk/test:run_all_unittests",
- "//mojo/public/cpp/system",
- "//mojo/shell/public/cpp",
- "//mojo/util:filename_util",
- "//testing/gtest",
- "//url",
- ]
-}
-
-mojom("test_bindings") {
- sources = [
- "application_manager_apptests.mojom",
- "capability_filter_unittest.mojom",
- "package_test.mojom",
- "test.mojom",
- ]
-}
-
-mojo_native_application("apptests") {
- output_name = "mojo_shell_apptests"
- testonly = true
-
- sources = [
- "application_manager_apptest.cc",
- "package_apptest.cc",
- ]
-
- deps = [
- ":apptests_manifest",
- ":test_bindings",
- "//base",
- "//base/test:test_config",
- "//mojo/common:common_base",
- "//mojo/converters/network",
- "//mojo/shell/public/cpp:sources",
- "//mojo/shell/public/cpp:test_support",
- "//mojo/shell/public/interfaces",
- ]
-
- data_deps = [
- ":application_manager_apptest_driver",
- ":application_manager_apptest_target",
- ":package_test_package",
- ]
-}
-
-mojo_application_manifest("apptests_manifest") {
- application_name = "mojo_shell_apptests"
- source = "application_manager_apptest_manifest.json"
-}
-
-mojo_application_manifest("package_test_a_manifest") {
- application_name = "package_test_a"
- source = "package_test_app_a_manifest.json"
-}
-
-mojo_application_manifest("package_test_b_manifest") {
- application_name = "package_test_b"
- source = "package_test_app_b_manifest.json"
-}
-
-mojo_native_application("package_test_package") {
- testonly = true
- sources = [
- "package_test_package.cc",
- ]
- deps = [
- ":package_test_package_manifest",
- ":test_bindings",
- "//base",
- "//mojo/common:common_base",
- "//mojo/shell/public/cpp:sources",
- "//mojo/shell/public/interfaces",
- ]
-}
-
-mojo_application_manifest("package_test_package_manifest") {
- application_name = "package_test_package"
- source = "package_test_package_manifest.json"
- deps = [
- ":package_test_a_manifest",
- ":package_test_b_manifest",
- ]
- packaged_applications = [
- "package_test_a",
- "package_test_b",
- ]
-}
-
-executable("application_manager_apptest_driver") {
- testonly = true
-
- sources = [
- "application_manager_apptest_driver.cc",
- ]
-
- deps = [
- ":copy_application_manager_apptest_driver_manifest",
- ":test_bindings",
- "//base",
- "//base:base_static",
- "//build/config/sanitizers:deps",
- "//mojo/common:common_base",
- "//mojo/converters/network",
- "//mojo/edk/system",
- "//mojo/shell/public/cpp",
- "//mojo/shell/public/interfaces",
- "//mojo/shell/runner:init",
- "//mojo/shell/runner/child:test_native_main",
- "//mojo/shell/runner/common",
- ]
-}
-
-copy("copy_application_manager_apptest_driver_manifest") {
- sources = [
- "application_manager_apptest_driver_manifest.json",
- ]
- outputs = [
- "${root_out_dir}/{{source_file_part}}",
- ]
-}
-
-executable("application_manager_apptest_target") {
- testonly = true
-
- sources = [
- "application_manager_apptest_target.cc",
- ]
-
- deps = [
- ":test_bindings",
- "//base",
- "//build/config/sanitizers:deps",
- "//mojo/common:common_base",
- "//mojo/converters/network",
- "//mojo/shell/public/cpp",
- "//mojo/shell/runner/child:test_native_main",
- ]
-}
diff --git a/mojo/shell/tests/BUILD.gn b/mojo/shell/tests/BUILD.gn
new file mode 100644
index 0000000..d50cf5e
--- /dev/null
+++ b/mojo/shell/tests/BUILD.gn
@@ -0,0 +1,186 @@
+# Copyright 2016 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/mojo_application_manifest.gni")
+import("//mojo/public/tools/bindings/mojom.gni")
+import("//testing/test.gni")
+
+group("tests") {
+ testonly = true
+ deps = [
+ ":apptests",
+ ":mojo_shell_unittests",
+ ]
+}
+
+source_set("test_support") {
+ testonly = true
+ sources = [
+ "capability_filter_test.cc",
+ "capability_filter_test.h",
+ ]
+
+ deps = [
+ ":test_bindings",
+ "//mojo/shell",
+ "//mojo/shell/public/cpp",
+ "//mojo/shell/public/interfaces",
+ "//testing/gtest",
+ ]
+}
+
+# TODO(beng): this target should just be called "unittests" but I am having
+# difficulty with the android _apk generator.
+test("mojo_shell_unittests") {
+ sources = [
+ "application_manager_unittest.cc",
+ "capability_filter_unittest.cc",
+ ]
+
+ deps = [
+ ":test_bindings",
+ ":test_support",
+ "//base",
+ "//mojo/edk/system:test_utils",
+ "//mojo/edk/test:run_all_unittests",
+ "//mojo/public/cpp/system",
+ "//mojo/shell",
+ "//mojo/shell/public/cpp",
+ "//mojo/util:filename_util",
+ "//testing/gtest",
+ "//url",
+ ]
+}
+
+mojom("test_bindings") {
+ sources = [
+ "application_manager_apptests.mojom",
+ "capability_filter_unittest.mojom",
+ "package_test.mojom",
+ "test.mojom",
+ ]
+}
+
+mojo_native_application("apptests") {
+ output_name = "mojo_shell_apptests"
+ testonly = true
+
+ sources = [
+ "application_manager_apptest.cc",
+ "package_apptest.cc",
+ ]
+
+ deps = [
+ ":apptests_manifest",
+ ":test_bindings",
+ "//base",
+ "//base/test:test_config",
+ "//mojo/common:common_base",
+ "//mojo/converters/network",
+ "//mojo/shell/public/cpp:sources",
+ "//mojo/shell/public/cpp:test_support",
+ "//mojo/shell/public/interfaces",
+ ]
+
+ data_deps = [
+ ":application_manager_apptest_driver",
+ ":application_manager_apptest_target",
+ ":package_test_package",
+ ]
+}
+
+mojo_application_manifest("apptests_manifest") {
+ application_name = "mojo_shell_apptests"
+ source = "application_manager_apptest_manifest.json"
+}
+
+mojo_application_manifest("package_test_a_manifest") {
+ application_name = "package_test_a"
+ source = "package_test_app_a_manifest.json"
+}
+
+mojo_application_manifest("package_test_b_manifest") {
+ application_name = "package_test_b"
+ source = "package_test_app_b_manifest.json"
+}
+
+mojo_native_application("package_test_package") {
+ testonly = true
+ sources = [
+ "package_test_package.cc",
+ ]
+ deps = [
+ ":package_test_package_manifest",
+ ":test_bindings",
+ "//base",
+ "//mojo/common:common_base",
+ "//mojo/shell/public/cpp:sources",
+ "//mojo/shell/public/interfaces",
+ ]
+}
+
+mojo_application_manifest("package_test_package_manifest") {
+ application_name = "package_test_package"
+ source = "package_test_package_manifest.json"
+ deps = [
+ ":package_test_a_manifest",
+ ":package_test_b_manifest",
+ ]
+ packaged_applications = [
+ "package_test_a",
+ "package_test_b",
+ ]
+}
+
+executable("application_manager_apptest_driver") {
+ testonly = true
+
+ sources = [
+ "application_manager_apptest_driver.cc",
+ ]
+
+ deps = [
+ ":copy_application_manager_apptest_driver_manifest",
+ ":test_bindings",
+ "//base",
+ "//base:base_static",
+ "//build/config/sanitizers:deps",
+ "//mojo/common:common_base",
+ "//mojo/converters/network",
+ "//mojo/edk/system",
+ "//mojo/shell/public/cpp",
+ "//mojo/shell/public/interfaces",
+ "//mojo/shell/runner:init",
+ "//mojo/shell/runner/child:test_native_main",
+ "//mojo/shell/runner/common",
+ ]
+}
+
+copy("copy_application_manager_apptest_driver_manifest") {
+ sources = [
+ "application_manager_apptest_driver_manifest.json",
+ ]
+ outputs = [
+ "${root_out_dir}/{{source_file_part}}",
+ ]
+}
+
+executable("application_manager_apptest_target") {
+ testonly = true
+
+ sources = [
+ "application_manager_apptest_target.cc",
+ ]
+
+ deps = [
+ ":test_bindings",
+ "//base",
+ "//build/config/sanitizers:deps",
+ "//mojo/common:common_base",
+ "//mojo/converters/network",
+ "//mojo/shell/public/cpp",
+ "//mojo/shell/runner/child:test_native_main",
+ ]
+}
diff --git a/mojo/shell/application_manager_apptest.cc b/mojo/shell/tests/application_manager_apptest.cc
index 9fbfdf9..80be147 100644
--- a/mojo/shell/application_manager_apptest.cc
+++ b/mojo/shell/tests/application_manager_apptest.cc
@@ -13,11 +13,11 @@
#include "base/process/process_handle.h"
#include "mojo/converters/network/network_type_converters.h"
#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/shell/application_manager_apptests.mojom.h"
#include "mojo/shell/public/cpp/application_test_base.h"
#include "mojo/shell/public/cpp/interface_factory.h"
#include "mojo/shell/public/cpp/shell.h"
#include "mojo/shell/public/interfaces/application_manager.mojom.h"
+#include "mojo/shell/tests/application_manager_apptests.mojom.h"
using mojo::shell::test::mojom::CreateInstanceForHandleTest;
diff --git a/mojo/shell/application_manager_apptest_driver.cc b/mojo/shell/tests/application_manager_apptest_driver.cc
index 2ac6584..2ac6584 100644
--- a/mojo/shell/application_manager_apptest_driver.cc
+++ b/mojo/shell/tests/application_manager_apptest_driver.cc
diff --git a/mojo/shell/application_manager_apptest_driver_manifest.json b/mojo/shell/tests/application_manager_apptest_driver_manifest.json
index d4b33a4..d4b33a4 100644
--- a/mojo/shell/application_manager_apptest_driver_manifest.json
+++ b/mojo/shell/tests/application_manager_apptest_driver_manifest.json
diff --git a/mojo/shell/application_manager_apptest_manifest.json b/mojo/shell/tests/application_manager_apptest_manifest.json
index 1c8fd8a..1c8fd8a 100644
--- a/mojo/shell/application_manager_apptest_manifest.json
+++ b/mojo/shell/tests/application_manager_apptest_manifest.json
diff --git a/mojo/shell/application_manager_apptest_target.cc b/mojo/shell/tests/application_manager_apptest_target.cc
index 133b547..5b5964f 100644
--- a/mojo/shell/application_manager_apptest_target.cc
+++ b/mojo/shell/tests/application_manager_apptest_target.cc
@@ -5,12 +5,12 @@
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/macros.h"
-#include "mojo/shell/application_manager_apptests.mojom.h"
#include "mojo/shell/public/cpp/connection.h"
#include "mojo/shell/public/cpp/shell.h"
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/runner/child/test_native_main.h"
#include "mojo/shell/runner/init.h"
+#include "mojo/shell/tests/application_manager_apptests.mojom.h"
using mojo::shell::test::mojom::CreateInstanceForHandleTestPtr;
diff --git a/mojo/shell/application_manager_apptests.mojom b/mojo/shell/tests/application_manager_apptests.mojom
index c57eb40..c57eb40 100644
--- a/mojo/shell/application_manager_apptests.mojom
+++ b/mojo/shell/tests/application_manager_apptests.mojom
diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/tests/application_manager_unittest.cc
index b280143..4f527b3 100644
--- a/mojo/shell/application_manager_unittest.cc
+++ b/mojo/shell/tests/application_manager_unittest.cc
@@ -19,7 +19,7 @@
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/cpp/shell_connection.h"
#include "mojo/shell/public/interfaces/interface_provider.mojom.h"
-#include "mojo/shell/test.mojom.h"
+#include "mojo/shell/tests/test.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/shell/capability_filter_test.cc b/mojo/shell/tests/capability_filter_test.cc
index 56e6d07..9377dd0 100644
--- a/mojo/shell/capability_filter_test.cc
+++ b/mojo/shell/tests/capability_filter_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/shell/capability_filter_test.h"
+#include "mojo/shell/tests/capability_filter_test.h"
#include <utility>
diff --git a/mojo/shell/capability_filter_test.h b/mojo/shell/tests/capability_filter_test.h
index 118f6cb..3e9baa8 100644
--- a/mojo/shell/capability_filter_test.h
+++ b/mojo/shell/tests/capability_filter_test.h
@@ -8,9 +8,9 @@
#include "base/message_loop/message_loop.h"
#include "mojo/shell/application_loader.h"
#include "mojo/shell/application_manager.h"
-#include "mojo/shell/capability_filter_unittest.mojom.h"
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/cpp/shell_connection.h"
+#include "mojo/shell/tests/capability_filter_unittest.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/shell/capability_filter_unittest.cc b/mojo/shell/tests/capability_filter_unittest.cc
index 8c54e6e..42748a5 100644
--- a/mojo/shell/capability_filter_unittest.cc
+++ b/mojo/shell/tests/capability_filter_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/macros.h"
-#include "mojo/shell/capability_filter_test.h"
+#include "mojo/shell/tests/capability_filter_test.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/shell/capability_filter_unittest.mojom b/mojo/shell/tests/capability_filter_unittest.mojom
index efdef7d..efdef7d 100644
--- a/mojo/shell/capability_filter_unittest.mojom
+++ b/mojo/shell/tests/capability_filter_unittest.mojom
diff --git a/mojo/shell/package_apptest.cc b/mojo/shell/tests/package_apptest.cc
index 1086fe3..b29bc02 100644
--- a/mojo/shell/package_apptest.cc
+++ b/mojo/shell/tests/package_apptest.cc
@@ -10,9 +10,9 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/run_loop.h"
-#include "mojo/shell/package_test.mojom.h"
#include "mojo/shell/public/cpp/application_test_base.h"
#include "mojo/shell/public/interfaces/application_manager.mojom.h"
+#include "mojo/shell/tests/package_test.mojom.h"
// Tests that multiple applications can be packaged in a single Mojo application
// implementing ShellClientFactory; that these applications can be specified by
diff --git a/mojo/shell/package_test.mojom b/mojo/shell/tests/package_test.mojom
index 1bcebcb..1bcebcb 100644
--- a/mojo/shell/package_test.mojom
+++ b/mojo/shell/tests/package_test.mojom
diff --git a/mojo/shell/package_test_app_a_manifest.json b/mojo/shell/tests/package_test_app_a_manifest.json
index 497d7b9..497d7b9 100644
--- a/mojo/shell/package_test_app_a_manifest.json
+++ b/mojo/shell/tests/package_test_app_a_manifest.json
diff --git a/mojo/shell/package_test_app_b_manifest.json b/mojo/shell/tests/package_test_app_b_manifest.json
index 8f6d6c9..8f6d6c9 100644
--- a/mojo/shell/package_test_app_b_manifest.json
+++ b/mojo/shell/tests/package_test_app_b_manifest.json
diff --git a/mojo/shell/package_test_package.cc b/mojo/shell/tests/package_test_package.cc
index 53a8bdf..53a8bdf 100644
--- a/mojo/shell/package_test_package.cc
+++ b/mojo/shell/tests/package_test_package.cc
diff --git a/mojo/shell/package_test_package_manifest.json b/mojo/shell/tests/package_test_package_manifest.json
index d4825b2..d4825b2 100644
--- a/mojo/shell/package_test_package_manifest.json
+++ b/mojo/shell/tests/package_test_package_manifest.json
diff --git a/mojo/shell/test.mojom b/mojo/shell/tests/test.mojom
index 25700b5..25700b5 100644
--- a/mojo/shell/test.mojom
+++ b/mojo/shell/tests/test.mojom