chromium/components/performance_manager/graph/worker_node_impl_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/performance_manager/graph/worker_node_impl.h"

#include "base/task/task_traits.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/graph/process_node_impl.h"
#include "components/performance_manager/public/execution_context_priority/execution_context_priority.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace performance_manager {

namespace {

class WorkerNodeImplTest : public GraphTestHarness {};

// Mock observer for the basic ObserverWorks test.
class LenientMockObserver : public WorkerNodeImpl::Observer {};

MockObserver;

_;
ElementsAre;
InSequence;
Invoke;
InvokeWithoutArgs;

}  // namespace

TEST_F(WorkerNodeImplTest, SafeDowncast) {}

WorkerNodeImplDeathTest;

TEST_F(WorkerNodeImplDeathTest, SafeDowncast) {}

TEST_F(WorkerNodeImplTest, ConstProperties) {}

TEST_F(WorkerNodeImplTest, OnFinalResponseURLDetermined) {}

// Create a worker of each type and register the frame as a client of each.
TEST_F(WorkerNodeImplTest, AddWorkerNodes) {}

// Create a frame and a worker of each type that are all clients of the service
// worker.
TEST_F(WorkerNodeImplTest, ClientsOfServiceWorkers) {}

// Create a hierarchy of nested dedicated workers where the parent one has 2
// children and one grandchildren.
TEST_F(WorkerNodeImplTest, NestedDedicatedWorkers) {}

TEST_F(WorkerNodeImplTest, PriorityAndReason) {}

TEST_F(WorkerNodeImplTest, ObserverWorks) {}

// Same as the AddWorkerNodes test, but the graph is verified through the
// WorkerNodeObserver interface.
TEST_F(WorkerNodeImplTest, Observer_AddWorkerNodes) {}

// Same as the ClientsOfServiceWorkers test, but the graph is verified through
// the WorkerNodeObserver interface.
TEST_F(WorkerNodeImplTest, Observer_ClientsOfServiceWorkers) {}

TEST_F(WorkerNodeImplTest, Observer_OnFinalResponseURLDetermined) {}

TEST_F(WorkerNodeImplTest, Observer_OnPriorityAndReasonChanged) {}

}  // namespace performance_manager