#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
#include "base/test/null_task_runner.h"
#include "base/test/scoped_feature_list.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/interfaces/bindings/tests/sample_service.mojom-blink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/context_lifecycle_notifier.h"
#include "third_party/blink/renderer/platform/heap/heap_test_utilities.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/heap_observer_set.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"
#include "third_party/blink/renderer/platform/mojo/mojo_binding_context.h"
#include "third_party/blink/renderer/platform/testing/mock_context_lifecycle_notifier.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
namespace {
class ServiceImpl : public sample::blink::Service { … };
template <HeapMojoWrapperMode Mode>
class RemoteOwner : public GarbageCollected<RemoteOwner<Mode>> { … };
template <HeapMojoWrapperMode Mode>
class HeapMojoRemoteDestroyContextBaseTest : public TestSupportingGC { … };
template <HeapMojoWrapperMode Mode>
class HeapMojoRemoteDisconnectWithReasonHandlerBaseTest
: public TestSupportingGC { … };
template <HeapMojoWrapperMode Mode>
class HeapMojoRemoteMoveBaseTest : public TestSupportingGC { … };
}
class HeapMojoRemoteDestroyContextWithContextObserverTest
: public HeapMojoRemoteDestroyContextBaseTest<
HeapMojoWrapperMode::kWithContextObserver> { … };
class HeapMojoRemoteDestroyContextForceWithoutContextObserverTest
: public HeapMojoRemoteDestroyContextBaseTest<
HeapMojoWrapperMode::kForceWithoutContextObserver> { … };
class HeapMojoRemoteDisconnectWithReasonHandlerWithContextObserverTest
: public HeapMojoRemoteDisconnectWithReasonHandlerBaseTest<
HeapMojoWrapperMode::kWithContextObserver> { … };
class HeapMojoRemoteDisconnectWithReasonHandlerWithoutContextObserverTest
: public HeapMojoRemoteDisconnectWithReasonHandlerBaseTest<
HeapMojoWrapperMode::kForceWithoutContextObserver> { … };
class HeapMojoRemoteMoveWithContextObserverTest
: public HeapMojoRemoteMoveBaseTest<
HeapMojoWrapperMode::kWithContextObserver> { … };
class HeapMojoRemoteMoveWithoutContextObserverTest
: public HeapMojoRemoteMoveBaseTest<
HeapMojoWrapperMode::kForceWithoutContextObserver> { … };
TEST_F(HeapMojoRemoteDestroyContextWithContextObserverTest,
ResetsOnContextDestroyed) { … }
TEST_F(HeapMojoRemoteDestroyContextForceWithoutContextObserverTest,
ResetsOnContextDestroyed) { … }
TEST_F(HeapMojoRemoteDisconnectWithReasonHandlerWithContextObserverTest,
ResetWithReason) { … }
TEST_F(HeapMojoRemoteDisconnectWithReasonHandlerWithoutContextObserverTest,
ResetWithReason) { … }
TEST_F(HeapMojoRemoteMoveWithContextObserverTest, MoveSemantics) { … }
TEST_F(HeapMojoRemoteMoveWithoutContextObserverTest, MoveSemantics) { … }
}