chromium/chrome/browser/resource_coordinator/tab_load_tracker_unittest.cc

// Copyright 2018 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/resource_coordinator/tab_load_tracker.h"

#include <memory>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/process/kill.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_handle.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace resource_coordinator {

_;
StrictMock;
LoadingState;

namespace {

void NavigateAndFinishLoading(content::WebContents* web_contents,
                              const GURL& url) {}

std::unique_ptr<content::NavigationSimulator> NavigateAndKeepLoading(
    content::WebContents* web_contents,
    const GURL& url) {}

}  // namespace

// Test wrapper of TabLoadTracker that exposes some internals.
class TestTabLoadTracker : public TabLoadTracker {};

// A mock observer class.
class LenientMockObserver : public TabLoadTracker::Observer {};
MockObserver;

// A WebContentsObserver that forwards relevant WebContents events to the
// provided tracker.
class TestWebContentsObserver : public content::WebContentsObserver {};

// The test harness.
class TabLoadTrackerTest : public ChromeRenderViewHostTestHarness {};

// A macro that ensures that a meaningful line number gets included in the
// stack trace when ExpectTabCounts fails.
#define EXPECT_TAB_COUNTS(a, b, c, d)

TEST_F(TabLoadTrackerTest, DetermineLoadingState) {}

void TabLoadTrackerTest::StateTransitionsTest() {}

TEST_F(TabLoadTrackerTest, StateTransitions) {}

}  // namespace resource_coordinator