#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/browser_info.h"
#include "chrome/test/chromedriver/chrome/navigation_tracker.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/stub_devtools_client.h"
#include "chrome/test/chromedriver/chrome/stub_web_view.h"
#include "chrome/test/chromedriver/chrome/web_view_impl.h"
#include "chrome/test/chromedriver/net/timeout.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
void AssertPendingState(NavigationTracker* tracker,
bool expected_is_pending) { … }
class DeterminingLoadStateDevToolsClient : public StubDevToolsClient { … };
class EvaluateScriptWebView : public StubWebView { … };
}
TEST(NavigationTracker, FrameLoadStartStop) { … }
TEST(NavigationTracker, FrameLoadStartStartStop) { … }
TEST(NavigationTracker, MultipleFramesLoad) { … }
TEST(NavigationTracker, NavigationScheduledForOtherFrame) { … }
TEST(NavigationTracker, CurrentFrameLoading) { … }
TEST(NavigationTracker, FrameAttachDetach) { … }
TEST(NavigationTracker, SetFrameNoFrame) { … }
namespace {
class FailToEvalScriptDevToolsClient : public StubDevToolsClient { … };
}
TEST(NavigationTracker, UnknownStateFailsToDetermineState) { … }
TEST(NavigationTracker, UnknownStatePageNotLoadAtAll) { … }
TEST(NavigationTracker, UnknownStateForcesStart) { … }
TEST(NavigationTracker, UnknownStateForcesStartReceivesStop) { … }
TEST(NavigationTracker, OnSuccessfulNavigate) { … }
TEST(NavigationTracker, OnNetworkErroredNavigate) { … }
TEST(NavigationTracker, OnNonNetworkErroredNavigate) { … }
namespace {
class TargetClosedDevToolsClient : public StubDevToolsClient { … };
}
TEST(NavigationTracker, TargetClosedInIsPendingNavigation) { … }