chromium/content/browser/renderer_host/document_service_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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"

// Unit test for DocumentService in content/public/browser.

namespace content {

namespace {

const char kFooOrigin[] =;
const char kBarOrigin[] =;

// Help functions to manipulate RenderFrameHosts.

// Simulates navigation and returns the final RenderFrameHost.
RenderFrameHost* SimulateNavigation(RenderFrameHost* rfh, const GURL& url) {}

RenderFrameHost* AddChildFrame(RenderFrameHost* rfh, const GURL& url) {}

void DetachFrame(RenderFrameHost* rfh) {}

}  // namespace

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) {}

}  // namespace content