chromium/chrome/browser/performance_timeline_browsertest.cc

// Copyright 2022 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/extensions/extension_browsertest.h"
#include "chrome/browser/profiles/profile.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/sessions/content/session_tab_helper.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/background_script_executor.h"
#include "extensions/browser/script_executor.h"

namespace {

class PerformanceTimelineBrowserTest : public extensions::ExtensionBrowserTest {};

}  // namespace

// Fetched resources that are initiated from the IsolatedWorld should have NO
// resource timing entry emitted.
IN_PROC_BROWSER_TEST_F(PerformanceTimelineBrowserTest,
                       ResouceTiming_IsolatedWorld) {}

// Fetched resources that are initiated from the MainWorld should have one
// resource timing entry emitted.
IN_PROC_BROWSER_TEST_F(PerformanceTimelineBrowserTest,
                       ResouceTiming_MainWorld) {}

// The fetchResource function is injected by the extension and executed. The csp
// world in this case is the Isolated world. No resource timing entry is
// emitted.
IN_PROC_BROWSER_TEST_F(PerformanceTimelineBrowserTest,
                       ResouceTiming_FetchWithInjectedCode) {}