chromium/chrome/browser/ui/thumbnails/thumbnail_readiness_tracker_browsertest.cc

// Copyright 2020 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/ui/thumbnails/thumbnail_readiness_tracker.h"

#include <memory>

#include "base/test/mock_callback.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/prerender_test_util.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

AnyNumber;
AtLeast;
InSequence;

class ThumbnailReadinessTrackerBrowserTest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(ThumbnailReadinessTrackerBrowserTest,
                       NavigateAfterOnload) {}

IN_PROC_BROWSER_TEST_F(ThumbnailReadinessTrackerBrowserTest,
                       NavigateIframeAfterOnload) {}

// Regression test for crbug.com/1120940.
//
// Artifical navigations like history.pushState() shouldn't invalidate
// our thumbnail.
IN_PROC_BROWSER_TEST_F(ThumbnailReadinessTrackerBrowserTest,
                       PushStateAfterOnload) {}

class ThumbnailReadinessTrackerPrerenderTest
    : public ThumbnailReadinessTrackerBrowserTest {};

IN_PROC_BROWSER_TEST_F(ThumbnailReadinessTrackerPrerenderTest,
                       PrerenderAfterOnload) {}