#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote_set.h"
#include <utility>
#include <string>
#include "base/memory/raw_ptr.h"
#include "base/test/null_task_runner.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote_set.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"
namespace blink {
namespace {
template <HeapMojoWrapperMode Mode>
class HeapMojoRemoteSetGCBaseTest;
template <HeapMojoWrapperMode Mode>
class GCOwner final : public GarbageCollected<GCOwner<Mode>> { … };
template <HeapMojoWrapperMode Mode>
class HeapMojoRemoteSetGCBaseTest : public TestSupportingGC { … };
}
class HeapMojoRemoteSetGCWithContextObserverTest
: public HeapMojoRemoteSetGCBaseTest<
HeapMojoWrapperMode::kWithContextObserver> { … };
class HeapMojoRemoteSetGCWithoutContextObserverTest
: public HeapMojoRemoteSetGCBaseTest<
HeapMojoWrapperMode::kForceWithoutContextObserver> { … };
TEST_F(HeapMojoRemoteSetGCWithContextObserverTest, RemovesRemote) { … }
TEST_F(HeapMojoRemoteSetGCWithContextObserverTest, NoClearOnConservativeGC) { … }
TEST_F(HeapMojoRemoteSetGCWithoutContextObserverTest, RemovesRemote) { … }
TEST_F(HeapMojoRemoteSetGCWithContextObserverTest, ClearLeavesSetEmpty) { … }
TEST_F(HeapMojoRemoteSetGCWithoutContextObserverTest, ClearLeavesSetEmpty) { … }
TEST_F(HeapMojoRemoteSetGCWithContextObserverTest, AddSeveralRemoteSet) { … }
}