#include <utility>
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/content_navigation_policy.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
std::unique_ptr<net::test_server::HttpResponse> HandleEchoTitleRequest(
const std::string& echotitle_path,
const net::test_server::HttpRequest& request) { … }
}
class SessionHistoryTest : public ContentBrowserTest { … };
class SessionHistoryScrollAnchorTest : public SessionHistoryTest { … };
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, BasicBackForward) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, FrameBackForward) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, FrameFormBackForward) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, CrossFrameFormBackForward) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, FragmentBackForward) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, JavascriptHistory) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, LocationReplace) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, LocationChangeInSubframe) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryScrollAnchorTest,
LocationChangeInSubframe) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, HistoryLength) { … }
IN_PROC_BROWSER_TEST_F(SessionHistoryTest, GoBackToCrossSitePostWithRedirect) { … }
}