#include "content/public/browser/document_service.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "content/browser/renderer_host/document_service_echo_impl.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/test/echo.test-mojom.h"
#include "content/test/test_render_frame_host.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "url/gurl.h"
namespace content {
namespace {
const char kFooOrigin[] = …;
const char kBarOrigin[] = …;
RenderFrameHost* SimulateNavigation(RenderFrameHost* rfh, const GURL& url) { … }
RenderFrameHost* AddChildFrame(RenderFrameHost* rfh, const GURL& url) { … }
void DetachFrame(RenderFrameHost* rfh) { … }
}
class DocumentServiceTest : public RenderViewHostTestHarness { … };
TEST_F(DocumentServiceTest, ConnectionError) { … }
TEST_F(DocumentServiceTest, RenderFrameDeleted) { … }
TEST_F(DocumentServiceTest, DidFinishNavigation) { … }
TEST_F(DocumentServiceTest, SameDocumentNavigation) { … }
TEST_F(DocumentServiceTest, FailedNavigation) { … }
TEST_F(DocumentServiceTest, DeleteContents) { … }
}