summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/config/android/test/proto
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/build/config/android/test/proto')
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/BUILD.gn103
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/absolute_dep/absolute_dep.proto10
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/relative_dep/relative_dep.proto10
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/root/absolute_child.proto10
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/root/absolute_root.proto18
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/root/relative_child.proto10
-rw-r--r--third_party/libwebrtc/build/config/android/test/proto/root/relative_root.proto18
7 files changed, 179 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/config/android/test/proto/BUILD.gn b/third_party/libwebrtc/build/config/android/test/proto/BUILD.gn
new file mode 100644
index 0000000000..a28111a66a
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/BUILD.gn
@@ -0,0 +1,103 @@
+# Copyright 2020 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("//build/config/android/rules.gni")
+import("//third_party/protobuf/proto_library.gni")
+
+# The purpose of these targets is test that |deps| satisfies java compilation
+# dependencies, and that |import_dirs| allows us to deal with various relative
+# imports to other proto dependencies. Although we should strive to avoid using
+# |import_dirs| and relative import paths, preferring to use absolute imports
+# whenever possible. See https://crbug.com/691451. While this target is
+# primarily to test that the Java proto targets build correctly, also build the
+# C++ versions of the protos as well. There are currently some configurations of
+# Java protos that can be built but will not work for C++, see
+# https://crbug.com/1039014, so make sure we don't create any tests that would
+# violate that.
+group("test_build_protos") {
+ deps = [
+ ":absolute_root_proto",
+ ":absolute_root_proto_java",
+ ":relative_root_proto",
+ ":relative_root_proto_java",
+ ]
+}
+
+proto_java_library("absolute_root_proto_java") {
+ proto_path = "//"
+ import_dirs = [ "relative_dep/" ]
+ sources = [
+ "root/absolute_child.proto",
+ "root/absolute_root.proto",
+ ]
+ deps = [
+ ":absolute_dep_proto_java",
+ ":relative_dep_proto_java",
+ ]
+}
+
+proto_java_library("relative_root_proto_java") {
+ proto_path = "root/"
+ import_dirs = [
+ "relative_dep/",
+ "//",
+ ]
+ sources = [
+ "root/relative_child.proto",
+ "root/relative_root.proto",
+ ]
+ deps = [
+ ":absolute_dep_proto_java",
+ ":relative_dep_proto_java",
+ ]
+}
+
+proto_java_library("absolute_dep_proto_java") {
+ proto_path = "//"
+ sources = [ "absolute_dep/absolute_dep.proto" ]
+}
+
+proto_java_library("relative_dep_proto_java") {
+ proto_path = "relative_dep/"
+ sources = [ "relative_dep/relative_dep.proto" ]
+}
+
+proto_library("absolute_root_proto") {
+ proto_in_dir = "//"
+ import_dirs = [ "relative_dep/" ]
+ sources = [
+ "root/absolute_child.proto",
+ "root/absolute_root.proto",
+ ]
+ link_deps = [
+ ":absolute_dep_proto",
+ ":relative_dep_proto",
+ ]
+}
+
+proto_library("relative_root_proto") {
+ proto_in_dir = "root/"
+ import_dirs = [
+ "relative_dep/",
+ "//",
+ ]
+ sources = [
+ "root/relative_child.proto",
+ "root/relative_root.proto",
+ ]
+ link_deps = [
+ ":absolute_dep_proto",
+ ":relative_dep_proto",
+ ]
+}
+
+proto_library("absolute_dep_proto") {
+ proto_in_dir = "//"
+ sources = [ "absolute_dep/absolute_dep.proto" ]
+}
+
+proto_library("relative_dep_proto") {
+ proto_in_dir = "relative_dep/"
+ sources = [ "relative_dep/relative_dep.proto" ]
+}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/absolute_dep/absolute_dep.proto b/third_party/libwebrtc/build/config/android/test/proto/absolute_dep/absolute_dep.proto
new file mode 100644
index 0000000000..46dcce7679
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/absolute_dep/absolute_dep.proto
@@ -0,0 +1,10 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+message AbsoluteDep {}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/relative_dep/relative_dep.proto b/third_party/libwebrtc/build/config/android/test/proto/relative_dep/relative_dep.proto
new file mode 100644
index 0000000000..600b6ca7fe
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/relative_dep/relative_dep.proto
@@ -0,0 +1,10 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+message RelativeDep {}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/root/absolute_child.proto b/third_party/libwebrtc/build/config/android/test/proto/root/absolute_child.proto
new file mode 100644
index 0000000000..d6a6a13f36
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/root/absolute_child.proto
@@ -0,0 +1,10 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+message AbsoluteChild {}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/root/absolute_root.proto b/third_party/libwebrtc/build/config/android/test/proto/root/absolute_root.proto
new file mode 100644
index 0000000000..3e200978d9
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/root/absolute_root.proto
@@ -0,0 +1,18 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+import "build/config/android/test/proto/root/absolute_child.proto";
+import "build/config/android/test/proto/absolute_dep/absolute_dep.proto";
+import "relative_dep.proto";
+
+message AbsoluteRoot {
+ optional AbsoluteChild absolute_child = 1;
+ optional AbsoluteDep absolute_dep = 2;
+ optional RelativeDep relative_dep = 3;
+}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/root/relative_child.proto b/third_party/libwebrtc/build/config/android/test/proto/root/relative_child.proto
new file mode 100644
index 0000000000..10f7ed4277
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/root/relative_child.proto
@@ -0,0 +1,10 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+message RelativeChild {}
diff --git a/third_party/libwebrtc/build/config/android/test/proto/root/relative_root.proto b/third_party/libwebrtc/build/config/android/test/proto/root/relative_root.proto
new file mode 100644
index 0000000000..a37a268b4f
--- /dev/null
+++ b/third_party/libwebrtc/build/config/android/test/proto/root/relative_root.proto
@@ -0,0 +1,18 @@
+// Copyright 2020 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.
+
+syntax = "proto2";
+
+package build.config.android.test;
+option java_package = "build.config.android.test";
+
+import "relative_child.proto";
+import "build/config/android/test/proto/absolute_dep/absolute_dep.proto";
+import "relative_dep.proto";
+
+message RelativeRoot {
+ optional RelativeChild relative_child = 1;
+ optional AbsoluteDep absolute_dep = 2;
+ optional RelativeDep relative_dep = 3;
+}