chromium/chrome/browser/chrome_do_not_track_browsertest.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 "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/prefs/pref_service.h"
#include "components/privacy_sandbox/tracking_protection_prefs.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"

namespace {

class ChromeDoNotTrackTest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, NotEnabled) {}

IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, Enabled) {}

// Checks that the DNT header is preserved when fetching from a dedicated
// worker.
IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, FetchFromWorker) {}

// Checks that the DNT header is preserved when fetching from a dedicated
// worker created from a dedicated worker.
IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, FetchFromNestedWorker) {}

// Checks that the DNT header is preserved when fetching from a shared worker.
//
// Disabled on Android since a shared worker is not available on Android:
// crbug.com/869745.
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_FetchFromSharedWorker
#else
#define MAYBE_FetchFromSharedWorker
#endif
IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, MAYBE_FetchFromSharedWorker) {}

// Checks that the DNT header is preserved when fetching from a service worker.
IN_PROC_BROWSER_TEST_F(ChromeDoNotTrackTest, FetchFromServiceWorker) {}

}  // namespace