Bug 1339477 - Add more IPDL unit tests. r=kanru draft
authorAndrew McCreight <continuation@gmail.com>
Tue, 14 Feb 2017 08:34:04 -0800
changeset 483659 af7b927df04b9b85752a7f16bf3e9b536f903145
parent 483640 fc9f6f7e8e86f00af60ff1ecc72eaf854a6b1ddd
child 545684 c11dae7e8b97b927f194739b30ae991a728d295f
push id45363
push userbmo:continuation@gmail.com
push dateTue, 14 Feb 2017 17:31:34 +0000
reviewerskanru
bugs1339477
milestone54.0a1
Bug 1339477 - Add more IPDL unit tests. r=kanru
ipc/ipdl/test/ipdl/error/AsyncInsideSync.ipdl
ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl
ipc/ipdl/test/ipdl/error/ForgottenManagee.ipdl
ipc/ipdl/test/ipdl/error/ForgottenManager.ipdl
ipc/ipdl/test/ipdl/error/InsideCpowToChild.ipdl
ipc/ipdl/test/ipdl/error/ManageeForgot.ipdl
ipc/ipdl/test/ipdl/error/ManagerForgot.ipdl
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/AsyncInsideSync.ipdl
@@ -0,0 +1,6 @@
+// inside_sync nested messages must be sync
+
+protocol AsyncInsideSync {
+child:
+    nested(inside_sync) async Msg();
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl
@@ -0,0 +1,6 @@
+// Async messages are not allowed to return values.
+
+protocol AsyncReturn {
+child:
+    async Msg() returns(int32_t aNumber);
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/ForgottenManagee.ipdl
@@ -0,0 +1,10 @@
+include protocol ManagerForgot;
+
+// This protocol says ManagerForgot manages it,
+// but ManagerForgot does not manage it.
+
+protocol ForgottenManagee {
+    manager ManagerForgot;
+child:
+    async __delete__();
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/ForgottenManager.ipdl
@@ -0,0 +1,9 @@
+include protocol ManageeForgot;
+
+// ManageeForgot should have this protocol as its manager.
+
+protocol ForgottenManager {
+    manages ManageeForgot;
+child:
+    async ManageeForgot();
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/InsideCpowToChild.ipdl
@@ -0,0 +1,6 @@
+// inside_cpow nested parent-to-child messages are verboten
+
+protocol InsideCpowToChild {
+child:
+    nested(inside_cpow) sync Msg();
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/ManageeForgot.ipdl
@@ -0,0 +1,9 @@
+include protocol ForgottenManager;
+
+// See ForgottenManager. This includes ForgottenManager to ensure that
+// loading this file fails.
+
+protocol ManageeForgot {
+child:
+    async __delete__();
+};
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/ManagerForgot.ipdl
@@ -0,0 +1,9 @@
+include protocol ForgottenManagee;
+
+// See ForgottenManagee.ipdl. This includes ForgottenManagee to
+// ensure that loading this file fails.
+
+protocol ManagerForgot {
+child:
+    async Msg();
+};