chromium/components/pdf/browser/pdf_document_helper_browsertest.cc

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

#include "components/pdf/browser/pdf_document_helper.h"

#include "base/test/metrics/user_action_tester.h"
#include "base/test/with_feature_override.h"
#include "build/build_config.h"
#include "components/pdf/browser/pdf_document_helper_client.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/touch_selection_controller_client_manager.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "pdf/mojom/pdf.mojom.h"
#include "pdf/pdf_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/pointer/touch_editing_controller.h"
#include "ui/gfx/selection_bound.h"

namespace pdf {

namespace {

NiceMock;

class FakePdfListener : public pdf::mojom::PdfListener {};

class TestPDFDocumentHelperClient : public PDFDocumentHelperClient {};

}  // namespace

class PDFDocumentHelperTest : public base::test::WithFeatureOverride,
                              public content::ContentBrowserTest {};

IN_PROC_BROWSER_TEST_P(PDFDocumentHelperTest, SetListenerTwice) {}

// Tests that select-changed on a pdf text brings up selection handles and the
// quick menu in the reasonable position.
IN_PROC_BROWSER_TEST_P(PDFDocumentHelperTest, SelectionChanged) {}

// When selecting something, only the copy command id should be enabled.
IN_PROC_BROWSER_TEST_P(PDFDocumentHelperTest, IsCommandIdEnabledCopyEnabled) {}

// Test that the copy command executes.
IN_PROC_BROWSER_TEST_P(PDFDocumentHelperTest, ExecuteCommandCopy) {}

IN_PROC_BROWSER_TEST_P(PDFDocumentHelperTest, DefaultImplementation) {}

// TODO(crbug.com/40268279): Stop testing both modes after OOPIF PDF viewer
// launches.
INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE();

}  // namespace pdf