chromium/chrome/browser/apps/link_capturing/link_capturing_navigation_throttle_unittest.cc

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

#include "chrome/browser/apps/link_capturing/link_capturing_navigation_throttle.h"

#include <map>
#include <string>

#include "base/test/scoped_feature_list.h"
#include "content/public/common/content_features.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/page_transition_types.h"
#include "url/gurl.h"

namespace apps {
namespace {

TEST(LinkCapturingNavigationThrottleTest, TestIsGoogleRedirectorUrl) {}

TEST(LinkCapturingNavigationThrottleTest, TestShouldOverrideUrlLoading) {}

// Tests that LinkCapturingNavigationThrottle::ShouldIgnoreNavigation returns
// false only for PAGE_TRANSITION_LINK when |allow_form_submit| is false and
// |is_in_fenced_frame_tree| is false.
TEST(LinkCapturingNavigationThrottleTest,
     TestShouldIgnoreNavigationWithCoreTypes) {}

// Test that LinkCapturingNavigationThrottle::ShouldIgnoreNavigation accepts
// FORM_SUBMIT when |allow_form_submit| is true.
TEST(LinkCapturingNavigationThrottleTest, TestFormSubmit) {}

// Tests that LinkCapturingNavigationThrottle::ShouldIgnoreNavigation returns
// true when no qualifiers except client redirect and server redirect are
// provided when |is_in_fenced_frame_tree| is false.
TEST(LinkCapturingNavigationThrottleTest,
     TestShouldIgnoreNavigationWithLinkWithQualifiers) {}

// Just in case, does the same with ui::PAGE_TRANSITION_TYPED.
TEST(LinkCapturingNavigationThrottleTest,
     TestShouldIgnoreNavigationWithTypedWithQualifiers) {}

// Test that LinkCapturingNavigationThrottle::ShouldIgnoreNavigation accepts
// SERVER_REDIRECT and CLIENT_REDIRECT when |is_in_fenced_frame_tree| is false.
TEST(LinkCapturingNavigationThrottleTest,
     TestShouldIgnoreNavigationWithClientRedirect) {}

// Test that MaskOutPageTransition correctly remove a qualifier from a given
// |page_transition|.
TEST(LinkCapturingNavigationThrottleTest, TestMaskOutPageTransition) {}

// Test that LinkCapturingNavigationThrottle::ShouldIgnoreNavigation accepts iff
// |has_user_gesture| is true when |is_in_fenced_frame_tree| is true.
TEST(LinkCapturingNavigationThrottleTest, TestInFencedFrameTree) {}

class LinkCapturingNavThrottleReimplTest
    : public testing::Test,
      public testing::WithParamInterface<bool> {};

TEST_P(LinkCapturingNavThrottleReimplTest, NotCreated) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace apps