#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/pdf/common/constants.h"
#include "content/public/test/mock_navigation_handle.h"
#include "net/http/http_util.h"
#include "ppapi/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_PLUGINS)
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/common/webplugininfo.h"
#endif
NiceMock;
namespace {
const char kExampleURL[] = …;
}
class PDFIFrameNavigationThrottleTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(PDFIFrameNavigationThrottleTest, OnlyCreateThrottleForSubframes) { … }
TEST_F(PDFIFrameNavigationThrottleTest, InterceptPDFOnly) { … }
TEST_F(PDFIFrameNavigationThrottleTest, AllowPDFAttachments) { … }
#if BUILDFLAG(ENABLE_PLUGINS)
TEST_F(PDFIFrameNavigationThrottleTest, ProceedIfPDFViewerIsEnabled) { … }
TEST_F(PDFIFrameNavigationThrottleTest, CancelIfPDFViewerIsDisabled) { … }
#endif