#include "chrome/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h"
#include <optional>
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/test/values_test_util.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/pdf/pdf_test_util.h"
#include "chrome/browser/pdf/pdf_viewer_stream_manager.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/pdf/common/constants.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/web_contents_tester.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
namespace extensions {
namespace {
constexpr char kSampleSetPdfPluginAttributesArgs[] = …;
}
class PdfViewerPrivateApiUnitTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(PdfViewerPrivateApiUnitTest, GetStreamInfoNoEmbedderHost) { … }
TEST_F(PdfViewerPrivateApiUnitTest, GetStreamInfoNoStreamContainer) { … }
TEST_F(PdfViewerPrivateApiUnitTest, GetStreamInfoValid) { … }
TEST_F(PdfViewerPrivateApiUnitTest, SetPdfDocumentTitleFullPagePdf) { … }
#ifndef NDEBUG
TEST_F(PdfViewerPrivateApiUnitTest, SetPdfDocumentTitleEmbeddedPdf) { … }
#endif
TEST_F(PdfViewerPrivateApiUnitTest, SetPdfPluginAttributesNoEmbedderHost) { … }
TEST_F(PdfViewerPrivateApiUnitTest, SetPdfPluginAttributesNoStreamContainer) { … }
TEST_F(PdfViewerPrivateApiUnitTest, SetPdfPluginAttributesValid) { … }
TEST_F(PdfViewerPrivateApiUnitTest,
SetPdfPluginAttributesValidAllowJavaScript) { … }
TEST_F(PdfViewerPrivateApiUnitTest,
SetPdfPluginAttributesBackgroundColorInvalidInteger) { … }
TEST_F(PdfViewerPrivateApiUnitTest,
SetPdfPluginAttributesBackgroundColorNegative) { … }
TEST_F(PdfViewerPrivateApiUnitTest,
SetPdfPluginAttributesBackgroundColorUpperBound) { … }
}