chromium/chrome/browser/performance_manager/page_load_tracker_decorator_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 "base/memory/raw_ptr.h"
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/performance_manager_impl.h"
#include "components/performance_manager/public/performance_manager.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace performance_manager {

namespace {

AnyOf;
ElementsAre;

// A class that waits for the GetLoadingState() property of a PageNode to
// transition to LoadingState::kLoadedIdle. Collects all intermediate states
// observed in-between. Generates an error if transitions are observed for
// another PageNode than |page_node|.
class PageLoadingStateObserver : public PageNode::ObserverDefaultImpl,
                                 public GraphOwnedDefaultImpl {};

}  // namespace

PageLoadTrackerDecoratorTest;

// Integration test verifying that everything is hooked up in Chrome to update
// PageNode::GetLoadingState() is updated on navigation. See
// PageLoadTrackerDecoratorTest for low level unit tests.
IN_PROC_BROWSER_TEST_F(PageLoadTrackerDecoratorTest, PageNodeLoadingState) {}

}  // namespace performance_manager