chromium/chrome/browser/extensions/autoplay_browsertest.cc

// Copyright 2017 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/stringprintf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/extensions/extension_action_test_helper.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "media/base/media_switches.h"

class AutoplayExtensionBrowserTest : public extensions::ExtensionApiTest {};

IN_PROC_BROWSER_TEST_F(AutoplayExtensionBrowserTest, AutoplayAllowed) {}

// TODO(crbug.com/40742402): AutoplayAllowedInIframe sporadically (~10%?) times
// out on Linux.
// TODO(crbug.com/40118868): Revisit once build flag switch of lacros-chrome is
// complete.
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_AutoplayAllowedInIframe
#else
#define MAYBE_AutoplayAllowedInIframe
#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
IN_PROC_BROWSER_TEST_F(AutoplayExtensionBrowserTest,
                       MAYBE_AutoplayAllowedInIframe) {}

IN_PROC_BROWSER_TEST_F(AutoplayExtensionBrowserTest,
                       AutoplayAllowedInHostedApp) {}