Bug 1316755, part 1 - Remove IPDL unit tests that use bridges, opens, and spawns. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Thu, 26 Jan 2017 16:30:18 -0800
changeset 468555 a43745dd5389bce9d3ebb5545b17b271fdb17fe7
parent 468539 478601e41e2549adf327237db505ac79faab9a74
child 468556 65391f4d428df34ac3b63217907656228248d6b9
push id43498
push userbmo:continuation@gmail.com
push dateTue, 31 Jan 2017 17:44:24 +0000
reviewersbillm
bugs1316755
milestone54.0a1
Bug 1316755, part 1 - Remove IPDL unit tests that use bridges, opens, and spawns. r=billm MozReview-Commit-ID: 3Te6nPOhYss
ipc/ipdl/test/cxx/Makefile.in
ipc/ipdl/test/cxx/PTestBridgeMain.ipdl
ipc/ipdl/test/cxx/PTestBridgeMainSub.ipdl
ipc/ipdl/test/cxx/PTestBridgeSub.ipdl
ipc/ipdl/test/cxx/PTestEndpointBridgeMain.ipdl
ipc/ipdl/test/cxx/PTestOpens.ipdl
ipc/ipdl/test/cxx/PTestOpensOpened.ipdl
ipc/ipdl/test/cxx/TestBridgeMain.cpp
ipc/ipdl/test/cxx/TestBridgeMain.h
ipc/ipdl/test/cxx/TestOpens.cpp
ipc/ipdl/test/cxx/TestOpens.h
ipc/ipdl/test/cxx/moz.build
ipc/ipdl/test/ipdl/ok/compositor.ipdl
ipc/ipdl/test/ipdl/ok/content.ipdl
ipc/ipdl/test/ipdl/ok/jetpackContent.ipdl
--- a/ipc/ipdl/test/cxx/Makefile.in
+++ b/ipc/ipdl/test/cxx/Makefile.in
@@ -1,17 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 IPDLTESTSRCS = $(filter Test%,$(CPPSRCS))
 IPDLTESTS = $(IPDLTESTSRCS:.cpp=)
 
 EXTRA_PROTOCOLS = \
-  TestBridgeSub \
   TestEndpointBridgeSub \
   $(NULL)
 
 IPDLTESTHDRS = $(addprefix $(srcdir)/,$(addsuffix .h,$(IPDLTESTS)))
 
 TESTER_TEMPLATE := $(srcdir)/IPDLUnitTests.template.cpp
 GENTESTER := $(srcdir)/genIPDLUnitTests.py
 
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/PTestBridgeMain.ipdl
+++ /dev/null
@@ -1,28 +0,0 @@
-include protocol PTestBridgeMainSub;
-include protocol PTestBridgeSub;
-
-namespace mozilla {
-namespace _ipdltest {
-
-
-protocol PTestBridgeMain {
-    child spawns PTestBridgeSub;
-    child opens PTestBridgeMainSub;
-
-child:
-    async Start();
-
-parent:
-    async __delete__();
-
-/*
-state START:
-    send Start goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
-};
-
-
-} // namespace mozilla
-} // namespace _ipdltest
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/PTestBridgeMainSub.ipdl
+++ /dev/null
@@ -1,35 +0,0 @@
-include protocol PTestBridgeMain;
-include protocol PTestBridgeSub;
-
-namespace mozilla {
-namespace _ipdltest {
-
-// (Bridge protocols can have different semantics than the endpoints
-// they bridge)
-intr protocol PTestBridgeMainSub {
-    bridges PTestBridgeMain, PTestBridgeSub;
-
-child:
-    async Hi();
-    intr HiRpc();
-
-parent:
-    async Hello();
-    sync HelloSync();
-    intr HelloRpc();
-    async __delete__();
-
-/*
-state START:       recv Hello goto HI;
-state HI:          send Hi goto HELLO_SYNC;
-state HELLO_SYNC:  recv HelloSync goto HELLO_RPC;
-state HELLO_RPC:   answer HelloRpc goto HI_RPC;
-state HI_RPC:      call HiRpc goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
-};
-
-
-} // namespace mozilla
-} // namespace _ipdltest
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/PTestBridgeSub.ipdl
+++ /dev/null
@@ -1,27 +0,0 @@
-include protocol PTestBridgeMainSub;
-
-namespace mozilla {
-namespace _ipdltest {
-
-
-protocol PTestBridgeSub {
-child:
-    async Ping();
-
-parent:
-    async BridgeEm();
-    async __delete__();
-
-/*
-state START:
-    send Ping goto BRIDGEEM;
-state BRIDGEEM:
-    recv BridgeEm goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
-};
-
-
-} // namespace mozilla
-} // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestEndpointBridgeMain.ipdl
+++ b/ipc/ipdl/test/cxx/PTestEndpointBridgeMain.ipdl
@@ -4,17 +4,16 @@
 include protocol PTestEndpointBridgeMainSub;
 include protocol PTestEndpointBridgeSub;
 
 namespace mozilla {
 namespace _ipdltest {
 
 
 protocol PTestEndpointBridgeMain {
-  child spawns PTestEndpointBridgeSub;
 
 child:
   async Start();
 
 parent:
   async Bridged(Endpoint<PTestEndpointBridgeMainSubParent> endpoint);
 };
 
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/PTestOpens.ipdl
+++ /dev/null
@@ -1,27 +0,0 @@
-include protocol PTestOpensOpened;
-
-namespace mozilla {
-namespace _ipdltest {
-
-
-protocol PTestOpens {
-    // This channel is opened and parked on a non-main thread
-    child opens PTestOpensOpened;
-
-child:
-    async Start();
-
-parent:
-    async __delete__();
-
-/*
-state START:
-    send Start goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
-};
-
-
-} // namespace mozilla
-} // namespace _ipdltest
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/PTestOpensOpened.ipdl
+++ /dev/null
@@ -1,30 +0,0 @@
-namespace mozilla {
-namespace _ipdltest2 {
-
-// (Opens protocols can have different semantics than the endpoints
-// that opened them)
-intr protocol PTestOpensOpened {
-child:
-    async Hi();
-    intr HiRpc();
-
-parent:
-    async Hello();
-    sync HelloSync();
-    intr HelloRpc();
-    async __delete__();
-
-/*
-state START:       recv Hello goto HI;
-state HI:          send Hi goto HELLO_SYNC;
-state HELLO_SYNC:  recv HelloSync goto HELLO_RPC;
-state HELLO_RPC:   answer HelloRpc goto HI_RPC;
-state HI_RPC:      call HiRpc goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
-};
-
-
-} // namespace mozilla
-} // namespace _ipdltest2
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/TestBridgeMain.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-#include "TestBridgeMain.h"
-
-#include "base/task.h"
-#include "IPDLUnitTests.h"      // fail etc.
-#include "IPDLUnitTestSubprocess.h"
-
-#include "nsAutoPtr.h"
-
-using namespace std;
-
-namespace mozilla {
-namespace _ipdltest {
-
-
-//-----------------------------------------------------------------------------
-// main process
-void
-TestBridgeMainParent::Main()
-{
-    if (!SendStart())
-        fail("sending Start");
-}
-
-PTestBridgeMainSubParent*
-TestBridgeMainParent::AllocPTestBridgeMainSubParent(Transport* transport,
-                                                    ProcessId otherPid)
-{
-    nsAutoPtr<TestBridgeMainSubParent> a(new TestBridgeMainSubParent(transport));
-    if (!a->Open(transport, otherPid, XRE_GetIOMessageLoop(), ipc::ParentSide)) {
-        return nullptr;
-    }
-    return a.forget();
-}
-
-void
-TestBridgeMainParent::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");  
-    passed("ok");
-    QuitParent();
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainSubParent::RecvHello()
-{
-    if (!SendHi()) {
-        return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainSubParent::RecvHelloSync()
-{
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainSubParent::AnswerHelloRpc()
-{
-    if (!CallHiRpc()) {
-        return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-}
-
-void
-TestBridgeMainSubParent::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");
-
-    // ActorDestroy() is just a callback from IPDL-generated code,
-    // which needs the top-level actor (this) to stay alive a little
-    // longer so other things can be cleaned up.
-    MessageLoop::current()->PostTask(
-        do_AddRef(new DeleteTask<TestBridgeMainSubParent>(this)));
-}
-
-//-----------------------------------------------------------------------------
-// sub process --- child of main
-TestBridgeMainChild* gBridgeMainChild;
-
-TestBridgeMainChild::TestBridgeMainChild()
-    : mSubprocess(nullptr)
-{
-    gBridgeMainChild = this;
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainChild::RecvStart()
-{
-    vector<string> subsubArgs;
-    subsubArgs.push_back("TestBridgeSub");
-
-    mSubprocess = new IPDLUnitTestSubprocess();
-    if (!mSubprocess->SyncLaunch(subsubArgs))
-        fail("problem launching subprocess");
-
-    IPC::Channel* transport = mSubprocess->GetChannel();
-    if (!transport)
-        fail("no transport");
-
-    TestBridgeSubParent* bsp = new TestBridgeSubParent();
-    bsp->Open(transport, base::GetProcId(mSubprocess->GetChildProcessHandle()));
-
-    bsp->Main();
-    return IPC_OK();
-}
-
-void
-TestBridgeMainChild::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");  
-    // NB: this is kosher because QuitChild() joins with the IO thread
-    XRE_GetIOMessageLoop()->PostTask(
-        do_AddRef(new DeleteTask<IPDLUnitTestSubprocess>(mSubprocess)));
-    QuitChild();
-}
-
-void
-TestBridgeSubParent::Main()
-{
-    if (!SendPing())
-        fail("sending Ping");
-}
-
-mozilla::ipc::IPCResult
-TestBridgeSubParent::RecvBridgeEm()
-{
-    if (NS_FAILED(PTestBridgeMainSub::Bridge(gBridgeMainChild, this)))
-        fail("bridging Main and Sub");
-    return IPC_OK();
-}
-
-void
-TestBridgeSubParent::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");
-    gBridgeMainChild->Close();
-
-    // ActorDestroy() is just a callback from IPDL-generated code,
-    // which needs the top-level actor (this) to stay alive a little
-    // longer so other things can be cleaned up.
-    MessageLoop::current()->PostTask(
-        do_AddRef(new DeleteTask<TestBridgeSubParent>(this)));
-}
-
-//-----------------------------------------------------------------------------
-// subsub process --- child of sub
-
-static TestBridgeSubChild* gBridgeSubChild;
-
-TestBridgeSubChild::TestBridgeSubChild()
-{
-    gBridgeSubChild = this;   
-}
-
-mozilla::ipc::IPCResult
-TestBridgeSubChild::RecvPing()
-{
-    if (!SendBridgeEm())
-        fail("sending BridgeEm");
-    return IPC_OK();
-}
-
-PTestBridgeMainSubChild*
-TestBridgeSubChild::AllocPTestBridgeMainSubChild(Transport* transport,
-                                                 ProcessId otherPid)
-{
-    nsAutoPtr<TestBridgeMainSubChild> a(new TestBridgeMainSubChild(transport));
-    if (!a->Open(transport, otherPid, XRE_GetIOMessageLoop(), ipc::ChildSide)) {
-        return nullptr;
-    }
-
-    if (!a->SendHello())
-        fail("sending Hello");
-
-    return a.forget();
-}
-
-void
-TestBridgeSubChild::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");
-    QuitChild();
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainSubChild::RecvHi()
-{
-    if (!SendHelloSync())
-        fail("sending HelloSync");
-    if (!CallHelloRpc())
-        fail("calling HelloRpc");
-    if (!mGotHi)
-        fail("didn't answer HiRpc");
-
-    // Need to close the channel without message-processing frames on
-    // the C++ stack
-    MessageLoop::current()->PostTask(
-        NewNonOwningRunnableMethod(this, &TestBridgeMainSubChild::Close));
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestBridgeMainSubChild::AnswerHiRpc()
-{
-    mGotHi = true;              // d00d
-    return IPC_OK();
-}
-
-void
-TestBridgeMainSubChild::ActorDestroy(ActorDestroyReason why)
-{
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");  
-
-    gBridgeSubChild->Close();
-
-    // ActorDestroy() is just a callback from IPDL-generated code,
-    // which needs the top-level actor (this) to stay alive a little
-    // longer so other things can be cleaned up.
-    MessageLoop::current()->PostTask(
-        do_AddRef(new DeleteTask<TestBridgeMainSubChild>(this)));
-}
-
-} // namespace mozilla
-} // namespace _ipdltest
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/TestBridgeMain.h
+++ /dev/null
@@ -1,149 +0,0 @@
-#ifndef mozilla__ipdltest_TestBridgeMain_h
-#define mozilla__ipdltest_TestBridgeMain_h 1
-
-#include "mozilla/_ipdltest/IPDLUnitTests.h"
-
-#include "mozilla/_ipdltest/PTestBridgeMainParent.h"
-#include "mozilla/_ipdltest/PTestBridgeMainChild.h"
-
-#include "mozilla/_ipdltest/PTestBridgeSubParent.h"
-#include "mozilla/_ipdltest/PTestBridgeSubChild.h"
-
-#include "mozilla/_ipdltest/PTestBridgeMainSubParent.h"
-#include "mozilla/_ipdltest/PTestBridgeMainSubChild.h"
-
-namespace mozilla {
-namespace _ipdltest {
-
-//-----------------------------------------------------------------------------
-// "Main" process
-//
-class TestBridgeMainParent :
-    public PTestBridgeMainParent
-{
-public:
-    TestBridgeMainParent() {}
-    virtual ~TestBridgeMainParent() {}
-
-    static bool RunTestInProcesses() { return true; }
-    static bool RunTestInThreads() { return false; }
-
-    void Main();
-
-protected:
-    virtual PTestBridgeMainSubParent*
-    AllocPTestBridgeMainSubParent(Transport* transport,
-                                  ProcessId otherProcess) override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-};
-
-class TestBridgeMainSubParent :
-    public PTestBridgeMainSubParent
-{
-public:
-    explicit TestBridgeMainSubParent(Transport* aTransport)
-        : mTransport(aTransport)
-    {}
-    virtual ~TestBridgeMainSubParent() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvHello() override;
-    virtual mozilla::ipc::IPCResult RecvHelloSync() override;
-    virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-
-    Transport* mTransport;
-};
-
-//-----------------------------------------------------------------------------
-// "Sub" process --- child of "main"
-//
-class TestBridgeSubParent;
-
-class TestBridgeMainChild :
-    public PTestBridgeMainChild
-{
-public:
-    TestBridgeMainChild();
-    virtual ~TestBridgeMainChild() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvStart() override;
-
-    virtual PTestBridgeMainSubChild*
-    AllocPTestBridgeMainSubChild(Transport* transport,
-                                 ProcessId otherProcess) override
-    {
-        // This shouldn't be called. It's just a byproduct of testing that
-        // the right code is generated for a bridged protocol that's also
-        // opened, but we only test bridging here.
-        MOZ_CRASH();
-    }
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-
-    IPDLUnitTestSubprocess* mSubprocess;
-};
-
-class TestBridgeSubParent :
-    public PTestBridgeSubParent
-{
-public:
-    TestBridgeSubParent() {}
-    virtual ~TestBridgeSubParent() {}
-
-    void Main();
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvBridgeEm() override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-};
-
-//-----------------------------------------------------------------------------
-// "Subsub" process --- child of "sub"
-//
-class TestBridgeSubChild :
-    public PTestBridgeSubChild
-{
-public:
-    TestBridgeSubChild();
-    virtual ~TestBridgeSubChild() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvPing() override;
-
-    virtual PTestBridgeMainSubChild*
-    AllocPTestBridgeMainSubChild(Transport* transport,
-                                 ProcessId otherProcess) override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-};
-
-class TestBridgeMainSubChild :
-    public PTestBridgeMainSubChild
-{
-public:
-    explicit TestBridgeMainSubChild(Transport* aTransport)
-        : mGotHi(false)
-        , mTransport(aTransport)
-    {}
-    virtual ~TestBridgeMainSubChild() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvHi() override;
-    virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-
-    bool mGotHi;
-    Transport* mTransport;
-};
-
-} // namespace _ipdltest
-} // namespace mozilla
-
-
-#endif // ifndef mozilla__ipdltest_TestBridgeMain_h
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/TestOpens.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-#include "base/task.h"
-#include "base/thread.h"
-
-#include "TestOpens.h"
-
-#include "IPDLUnitTests.h"      // fail etc.
-
-using namespace mozilla::ipc;
-
-using base::ProcessHandle;
-using base::Thread;
-
-namespace mozilla {
-// NB: this is generally bad style, but I am lazy.
-using namespace _ipdltest;
-using namespace _ipdltest2;
-
-static MessageLoop* gMainThread;
-
-static void
-AssertNotMainThread()
-{
-    if (!gMainThread)
-        fail("gMainThread is not initialized");
-    if (MessageLoop::current() == gMainThread)
-        fail("unexpectedly called on the main thread");
-}
-
-//-----------------------------------------------------------------------------
-// parent
-
-// Thread on which TestOpensOpenedParent runs
-static Thread* gParentThread;
-
-void
-TestOpensParent::Main()
-{
-    if (!SendStart())
-        fail("sending Start");
-}
-
-static void
-OpenParent(TestOpensOpenedParent* aParent,
-           Transport* aTransport, base::ProcessId aOtherPid)
-{
-    AssertNotMainThread();
-
-    // Open the actor on the off-main thread to park it there.
-    // Messages will be delivered to this thread's message loop
-    // instead of the main thread's.
-    if (!aParent->Open(aTransport, aOtherPid,
-                       XRE_GetIOMessageLoop(), ipc::ParentSide))
-        fail("opening Parent");
-}
-
-PTestOpensOpenedParent*
-TestOpensParent::AllocPTestOpensOpenedParent(Transport* transport,
-                                             ProcessId otherPid)
-{
-    gMainThread = MessageLoop::current();
-
-    gParentThread = new Thread("ParentThread");
-    if (!gParentThread->Start())
-        fail("starting parent thread");
-
-    TestOpensOpenedParent* a = new TestOpensOpenedParent(transport);
-    gParentThread->message_loop()->PostTask(
-        NewRunnableFunction(OpenParent, a, transport, otherPid));
-
-    return a;
-}
-
-void
-TestOpensParent::ActorDestroy(ActorDestroyReason why)
-{
-    // Stops the thread and joins it
-    delete gParentThread;
-
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");  
-    passed("ok");
-    QuitParent();
-}
-
-mozilla::ipc::IPCResult
-TestOpensOpenedParent::RecvHello()
-{
-    AssertNotMainThread();
-    if (!SendHi()) {
-        return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestOpensOpenedParent::RecvHelloSync()
-{
-    AssertNotMainThread();
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestOpensOpenedParent::AnswerHelloRpc()
-{
-    AssertNotMainThread();
-    if (!CallHiRpc()) {
-        return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-}
-
-static void
-ShutdownTestOpensOpenedParent(TestOpensOpenedParent* parent,
-                              Transport* transport)
-{
-    delete parent;
-}
-
-void
-TestOpensOpenedParent::ActorDestroy(ActorDestroyReason why)
-{
-    AssertNotMainThread();
-
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");
-
-    // ActorDestroy() is just a callback from IPDL-generated code,
-    // which needs the top-level actor (this) to stay alive a little
-    // longer so other things can be cleaned up.
-    gParentThread->message_loop()->PostTask(
-        NewRunnableFunction(ShutdownTestOpensOpenedParent,
-                            this, mTransport));
-}
-
-//-----------------------------------------------------------------------------
-// child
-
-static TestOpensChild* gOpensChild;
-// Thread on which TestOpensOpenedChild runs
-static Thread* gChildThread;
-
-TestOpensChild::TestOpensChild()
-{
-    gOpensChild = this;
-}
-
-mozilla::ipc::IPCResult
-TestOpensChild::RecvStart()
-{
-    if (!PTestOpensOpened::Open(this))
-        fail("opening PTestOpensOpened");
-    return IPC_OK();
-}
-
-static void
-OpenChild(TestOpensOpenedChild* aChild,
-           Transport* aTransport, base::ProcessId aOtherPid)
-{
-    AssertNotMainThread();
-
-    // Open the actor on the off-main thread to park it there.
-    // Messages will be delivered to this thread's message loop
-    // instead of the main thread's.
-    if (!aChild->Open(aTransport, aOtherPid,
-                      XRE_GetIOMessageLoop(), ipc::ChildSide))
-        fail("opening Child");
-
-    // Kick off the unit tests
-    if (!aChild->SendHello())
-        fail("sending Hello");
-}
-
-PTestOpensOpenedChild*
-TestOpensChild::AllocPTestOpensOpenedChild(Transport* transport,
-                                           ProcessId otherPid)
-{
-    gMainThread = MessageLoop::current();
-
-    gChildThread = new Thread("ChildThread");
-    if (!gChildThread->Start())
-        fail("starting child thread");
-
-    TestOpensOpenedChild* a = new TestOpensOpenedChild(transport);
-    gChildThread->message_loop()->PostTask(
-        NewRunnableFunction(OpenChild, a, transport, otherPid));
-
-    return a;
-}
-
-void
-TestOpensChild::ActorDestroy(ActorDestroyReason why)
-{
-    // Stops the thread and joins it
-    delete gChildThread;
-
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");
-    QuitChild();
-}
-
-mozilla::ipc::IPCResult
-TestOpensOpenedChild::RecvHi()
-{
-    AssertNotMainThread();
-
-    if (!SendHelloSync())
-        fail("sending HelloSync");
-    if (!CallHelloRpc())
-        fail("calling HelloRpc");
-    if (!mGotHi)
-        fail("didn't answer HiRpc");
-
-    // Need to close the channel without message-processing frames on
-    // the C++ stack
-    MessageLoop::current()->PostTask(
-        NewNonOwningRunnableMethod(this, &TestOpensOpenedChild::Close));
-    return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-TestOpensOpenedChild::AnswerHiRpc()
-{
-    AssertNotMainThread();
-
-    mGotHi = true;              // d00d
-    return IPC_OK();
-}
-
-static void
-ShutdownTestOpensOpenedChild(TestOpensOpenedChild* child,
-                             Transport* transport)
-{
-    delete child;
-
-    // Kick off main-thread shutdown.
-    gMainThread->PostTask(
-        NewNonOwningRunnableMethod(gOpensChild, &TestOpensChild::Close));
-}
-
-void
-TestOpensOpenedChild::ActorDestroy(ActorDestroyReason why)
-{
-    AssertNotMainThread();
-
-    if (NormalShutdown != why)
-        fail("unexpected destruction!");  
-
-    // ActorDestroy() is just a callback from IPDL-generated code,
-    // which needs the top-level actor (this) to stay alive a little
-    // longer so other things can be cleaned up.  Defer shutdown to
-    // let cleanup finish.
-    gChildThread->message_loop()->PostTask(
-        NewRunnableFunction(ShutdownTestOpensOpenedChild,
-                            this, mTransport));
-}
-
-} // namespace mozilla
deleted file mode 100644
--- a/ipc/ipdl/test/cxx/TestOpens.h
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef mozilla__ipdltest_TestOpens_h
-#define mozilla__ipdltest_TestOpens_h 1
-
-#include "mozilla/_ipdltest/IPDLUnitTests.h"
-
-#include "mozilla/_ipdltest/PTestOpensParent.h"
-#include "mozilla/_ipdltest/PTestOpensChild.h"
-
-#include "mozilla/_ipdltest2/PTestOpensOpenedParent.h"
-#include "mozilla/_ipdltest2/PTestOpensOpenedChild.h"
-
-namespace mozilla {
-
-// parent process
-
-namespace _ipdltest {
-
-class TestOpensParent : public PTestOpensParent
-{
-public:
-    TestOpensParent() {}
-    virtual ~TestOpensParent() {}
-
-    static bool RunTestInProcesses() { return true; }
-    static bool RunTestInThreads() { return false; }
-
-    void Main();
-
-protected:
-    virtual PTestOpensOpenedParent*
-    AllocPTestOpensOpenedParent(Transport* transport, ProcessId otherProcess) override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-};
-
-} // namespace _ipdltest
-
-namespace _ipdltest2 {
-
-class TestOpensOpenedParent : public PTestOpensOpenedParent
-{
-public:
-    explicit TestOpensOpenedParent(Transport* aTransport)
-        : mTransport(aTransport)
-    {}
-    virtual ~TestOpensOpenedParent() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvHello() override;
-    virtual mozilla::ipc::IPCResult RecvHelloSync() override;
-    virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-
-    Transport* mTransport;
-};
-
-} // namespace _ipdltest2
-
-// child process
-
-namespace _ipdltest {
-
-class TestOpensChild : public PTestOpensChild
-{
-public:
-    TestOpensChild();
-    virtual ~TestOpensChild() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvStart() override;
-
-    virtual PTestOpensOpenedChild*
-    AllocPTestOpensOpenedChild(Transport* transport, ProcessId otherProcess) override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-};
-
-} // namespace _ipdltest
-
-namespace _ipdltest2 {
-
-class TestOpensOpenedChild : public PTestOpensOpenedChild
-{
-public:
-    explicit TestOpensOpenedChild(Transport* aTransport)
-        : mGotHi(false)
-        , mTransport(aTransport)
-    {}
-    virtual ~TestOpensOpenedChild() {}
-
-protected:
-    virtual mozilla::ipc::IPCResult RecvHi() override;
-    virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
-
-    virtual void ActorDestroy(ActorDestroyReason why) override;
-
-    bool mGotHi;
-    Transport* mTransport;
-};
-
-} // namespace _ipdltest2
-
-} // namespace mozilla
-
-
-#endif // ifndef mozilla__ipdltest_TestOpens_h
--- a/ipc/ipdl/test/cxx/moz.build
+++ b/ipc/ipdl/test/cxx/moz.build
@@ -11,17 +11,16 @@ EXPORTS.mozilla._ipdltest += [
     'IPDLUnitTests.h',
     'IPDLUnitTestTypes.h',
     'IPDLUnitTestUtils.h',
 ]
 
 SOURCES += [
     'TestActorPunning.cpp',
     'TestBadActor.cpp',
-    'TestBridgeMain.cpp',
     'TestCancel.cpp',
     'TestCrashCleanup.cpp',
     'TestDataStructures.cpp',
     'TestDemon.cpp',
     'TestDesc.cpp',
     'TestEndpointBridgeMain.cpp',
     'TestEndpointOpens.cpp',
     'TestFailedCtor.cpp',
@@ -30,17 +29,16 @@ SOURCES += [
     'TestInterruptErrorCleanup.cpp',
     'TestInterruptRaces.cpp',
     'TestInterruptShutdownRace.cpp',
     'TestJSON.cpp',
     'TestLatency.cpp',
     'TestManyChildAllocs.cpp',
     'TestMultiMgrs.cpp',
     'TestNestedLoops.cpp',
-    'TestOpens.cpp',
     'TestRaceDeadlock.cpp',
     'TestRaceDeferral.cpp',
     'TestRacyInterruptReplies.cpp',
     'TestRacyReentry.cpp',
     'TestRacyUndefer.cpp',
     'TestRPC.cpp',
     'TestSanity.cpp',
     'TestSelfManageRoot.cpp',
@@ -61,19 +59,16 @@ SOURCES += [
 ]
 
 IPDL_SOURCES += [
     'PTestActorPunning.ipdl',
     'PTestActorPunningPunned.ipdl',
     'PTestActorPunningSub.ipdl',
     'PTestBadActor.ipdl',
     'PTestBadActorSub.ipdl',
-    'PTestBridgeMain.ipdl',
-    'PTestBridgeMainSub.ipdl',
-    'PTestBridgeSub.ipdl',
     'PTestCancel.ipdl',
     'PTestCrashCleanup.ipdl',
     'PTestDataStructures.ipdl',
     'PTestDataStructuresCommon.ipdlh',
     'PTestDataStructuresSub.ipdl',
     'PTestDemon.ipdl',
     'PTestDesc.ipdl',
     'PTestDescSub.ipdl',
@@ -100,18 +95,16 @@ IPDL_SOURCES += [
     'PTestLatency.ipdl',
     'PTestManyChildAllocs.ipdl',
     'PTestManyChildAllocsSub.ipdl',
     'PTestMultiMgrs.ipdl',
     'PTestMultiMgrsBottom.ipdl',
     'PTestMultiMgrsLeft.ipdl',
     'PTestMultiMgrsRight.ipdl',
     'PTestNestedLoops.ipdl',
-    'PTestOpens.ipdl',
-    'PTestOpensOpened.ipdl',
     'PTestPriority.ipdl',
     'PTestRaceDeadlock.ipdl',
     'PTestRaceDeferral.ipdl',
     'PTestRacyInterruptReplies.ipdl',
     'PTestRacyReentry.ipdl',
     'PTestRacyUndefer.ipdl',
     'PTestRPC.ipdl',
     'PTestSanity.ipdl',
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/ok/compositor.ipdl
+++ /dev/null
@@ -1,9 +0,0 @@
-include protocol content;
-
-sync protocol compositor {
-    bridges compositor, content;
-
-child:
-    async __delete__();
-
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/ok/content.ipdl
+++ /dev/null
@@ -1,15 +0,0 @@
-include protocol compositor;
-include protocol jetpack;
-include protocol media;
-include protocol plugin;
-
-sync protocol content {
-    parent spawns compositor as parent;
-    parent spawns jetpack;
-    child spawns plugin;
-    child opens media;
-
-child:
-    async __delete__();
-
-};
deleted file mode 100644
--- a/ipc/ipdl/test/ipdl/ok/jetpackContent.ipdl
+++ /dev/null
@@ -1,10 +0,0 @@
-include protocol content;
-include protocol jetpack;
-
-intr protocol jetpackContent {
-    bridges jetpack, content;
-
-child:
-    async __delete__();
-
-};