From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- ipc/ipdl/test/cxx/TestSelfManageRoot.h | 117 --------------------------------- 1 file changed, 117 deletions(-) delete mode 100644 ipc/ipdl/test/cxx/TestSelfManageRoot.h (limited to 'ipc/ipdl/test/cxx/TestSelfManageRoot.h') diff --git a/ipc/ipdl/test/cxx/TestSelfManageRoot.h b/ipc/ipdl/test/cxx/TestSelfManageRoot.h deleted file mode 100644 index 5cea09b10d..0000000000 --- a/ipc/ipdl/test/cxx/TestSelfManageRoot.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef mozilla__ipdltest_TestSelfManageRoot_h -#define mozilla__ipdltest_TestSelfManageRoot_h 1 - -#include "mozilla/_ipdltest/IPDLUnitTests.h" - -#include "mozilla/_ipdltest/PTestSelfManageRootParent.h" -#include "mozilla/_ipdltest/PTestSelfManageRootChild.h" -#include "mozilla/_ipdltest/PTestSelfManageParent.h" -#include "mozilla/_ipdltest/PTestSelfManageChild.h" - -namespace mozilla { -namespace _ipdltest { - -//----------------------------------------------------------------------------- -// Parent side - -class TestSelfManageParent : public PTestSelfManageParent { - friend class PTestSelfManageParent; - - public: - MOZ_COUNTED_DEFAULT_CTOR(TestSelfManageParent) - MOZ_COUNTED_DTOR_OVERRIDE(TestSelfManageParent) - - ActorDestroyReason mWhy; - - protected: - PTestSelfManageParent* AllocPTestSelfManageParent() { - return new TestSelfManageParent(); - } - - bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; } - - virtual void ActorDestroy(ActorDestroyReason why) override { mWhy = why; } -}; - -class TestSelfManageRootParent : public PTestSelfManageRootParent { - friend class PTestSelfManageRootParent; - - public: - MOZ_COUNTED_DEFAULT_CTOR(TestSelfManageRootParent) - virtual ~TestSelfManageRootParent() { - MOZ_COUNT_DTOR(TestSelfManageRootParent); - } - - static bool RunTestInProcesses() { return true; } - static bool RunTestInThreads() { return true; } - - void Main(); - - protected: - PTestSelfManageParent* AllocPTestSelfManageParent() { - return new TestSelfManageParent(); - } - - bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; } - - virtual void ActorDestroy(ActorDestroyReason why) override { - if (NormalShutdown != why) fail("unexpected destruction!"); - passed("ok"); - QuitParent(); - } -}; - -//----------------------------------------------------------------------------- -// Child side - -class TestSelfManageChild : public PTestSelfManageChild { - friend class PTestSelfManageChild; - - public: - MOZ_COUNTED_DEFAULT_CTOR(TestSelfManageChild) - MOZ_COUNTED_DTOR_OVERRIDE(TestSelfManageChild) - - protected: - PTestSelfManageChild* AllocPTestSelfManageChild() { - return new TestSelfManageChild(); - } - - bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) { - delete a; - return true; - } - - virtual void ActorDestroy(ActorDestroyReason why) override {} -}; - -class TestSelfManageRootChild : public PTestSelfManageRootChild { - friend class PTestSelfManageRootChild; - - public: - MOZ_COUNTED_DEFAULT_CTOR(TestSelfManageRootChild) - virtual ~TestSelfManageRootChild() { - MOZ_COUNT_DTOR(TestSelfManageRootChild); - } - - void Main(); - - protected: - PTestSelfManageChild* AllocPTestSelfManageChild() { - return new TestSelfManageChild(); - } - - bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) { - delete a; - return true; - } - - virtual void ActorDestroy(ActorDestroyReason why) override { - if (NormalShutdown != why) fail("unexpected destruction!"); - QuitChild(); - } -}; - -} // namespace _ipdltest -} // namespace mozilla - -#endif // ifndef mozilla__ipdltest_TestSelfManageRoot_h -- cgit v1.2.3