#include "chrome/browser/pdf/pdf_viewer_stream_manager.h"
#include <memory>
#include "base/memory/weak_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/pdf/pdf_test_util.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/mock_navigation_handle.h"
#include "content/public/test/navigation_simulator.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#include "pdf/pdf_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom.h"
#include "url/gurl.h"
namespace pdf {
namespace {
NiceMock;
Return;
constexpr char kOriginalUrl1[] = …;
constexpr char kOriginalUrl2[] = …;
}
class PdfViewerStreamManagerTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(PdfViewerStreamManagerTest, AddAndGetStreamContainer) { … }
TEST_F(PdfViewerStreamManagerTest,
AddStreamContainerSameFrameTreeNodeIdUnclaimed) { … }
TEST_F(PdfViewerStreamManagerTest, AddAndGetStreamInvalidURL) { … }
TEST_F(PdfViewerStreamManagerTest, AddMultipleStreamContainers) { … }
TEST_F(PdfViewerStreamManagerTest, IsPdfExtensionHost) { … }
TEST_F(PdfViewerStreamManagerTest, IsPdfContentHost) { … }
TEST_F(PdfViewerStreamManagerTest, DeleteWithMultipleStreamContainers) { … }
TEST_F(PdfViewerStreamManagerTest, DeleteUnclaimedStreamInfo) { … }
TEST_F(PdfViewerStreamManagerTest, RenderFrameDeletedWithClaimedStream) { … }
TEST_F(PdfViewerStreamManagerTest, RenderFrameDeletedWithUnclaimedStream) { … }
TEST_F(PdfViewerStreamManagerTest, EmbedderRenderFrameHostChanged) { … }
TEST_F(PdfViewerStreamManagerTest, ExtensionRenderFrameHostChanged) { … }
TEST_F(PdfViewerStreamManagerTest, ContentRenderFrameHostChanged) { … }
TEST_F(PdfViewerStreamManagerTest, EmbedderFrameDeleted) { … }
TEST_F(PdfViewerStreamManagerTest, ExtensionFrameDeleted) { … }
TEST_F(PdfViewerStreamManagerTest, ContentFrameDeleted) { … }
TEST_F(PdfViewerStreamManagerTest,
DidStartNavigationSetContentHostFrameTreeNodeId) { … }
TEST_F(PdfViewerStreamManagerTest, ReadyToCommitNavigationSubresourceOverride) { … }
TEST_F(PdfViewerStreamManagerTest,
ReadyToCommitNavigationSubresourceOverrideMultipleStreams) { … }
TEST_F(PdfViewerStreamManagerTest, ReadyToCommitNavigationClaimAndReplace) { … }
}