#include "components/navigation_interception/intercept_navigation_throttle.h"
#include <memory>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_navigation_throttle_inserter.h"
#include "content/public/test/test_renderer_host.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
NavigationThrottle;
_;
AllOf;
Eq;
Ne;
Not;
Property;
Return;
namespace navigation_interception {
namespace {
const char kTestUrl[] = …;
MATCHER(NavigationHandleUrlIsTest, "") { … }
MATCHER(IsPost, "") { … }
}
class MockInterceptCallbackReceiver { … };
class InterceptNavigationThrottleTest
: public content::RenderViewHostTestHarness,
public testing::WithParamInterface<bool> { … };
TEST_P(InterceptNavigationThrottleTest,
RequestCompletesIfNavigationNotIgnored) { … }
TEST_P(InterceptNavigationThrottleTest, RequestCancelledIfNavigationIgnored) { … }
TEST_P(InterceptNavigationThrottleTest, CallbackIsPostFalseForGet) { … }
TEST_P(InterceptNavigationThrottleTest, CallbackIsPostTrueForPost) { … }
TEST_P(InterceptNavigationThrottleTest,
CallbackIsPostFalseForPostConvertedToGetBy302) { … }
TEST_P(InterceptNavigationThrottleTest, PostNavigationCancelledAtStart) { … }
TEST_P(InterceptNavigationThrottleTest, IgnoreCallbackDeletesNavigation) { … }
INSTANTIATE_TEST_SUITE_P(…);
}