#include "components/subresource_filter/content/browser/navigation_console_logger.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace subresource_filter {
namespace {
const std::vector<std::string>& GetConsoleMessages(
content::RenderFrameHost* rfh) { … }
}
NavigationConsoleLoggerTest;
NavigationCallback;
class NavigationFinishCaller : public content::WebContentsObserver { … };
TEST_F(NavigationConsoleLoggerTest, NavigationFails_NoLog) { … }
TEST_F(NavigationConsoleLoggerTest, NavigationCommitsToErrorPage_NoLog) { … }
TEST_F(NavigationConsoleLoggerTest, NavigationCommitsSuccessfully_Logs) { … }
TEST_F(NavigationConsoleLoggerTest, NavigationAlreadyCommit_Logs) { … }
TEST_F(NavigationConsoleLoggerTest, NavigationAlreadyFailed_NoLog) { … }
TEST_F(NavigationConsoleLoggerTest, MultipleNavigations_OneLog) { … }
TEST_F(NavigationConsoleLoggerTest, MultipleMessages) { … }
TEST_F(NavigationConsoleLoggerTest, SyncNavigationDuringNavigation) { … }
}