#include "chrome/browser/content_settings/sound_content_setting_observer.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.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/content_settings/browser/page_specific_content_settings.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/autoplay/autoplay.mojom-test-utils.h"
#include "third_party/blink/public/mojom/autoplay/autoplay.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace {
const char* kMediaTestDataPath = …;
class TestAudioStateObserver : public content::WebContentsObserver { … };
class TestAutoplayConfigurationClient
: public blink::mojom::AutoplayConfigurationClientInterceptorForTesting { … };
class MultipleFramesObserver : public content::WebContentsObserver { … };
}
class SoundContentSettingObserverBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SoundContentSettingObserverBrowserTest,
SoundContentSettingObserverInPrerendering) { … }
IN_PROC_BROWSER_TEST_F(SoundContentSettingObserverBrowserTest,
AddAutoplayFlagsInPrerendering) { … }
class SoundContentSettingObserverFencedFrameBrowserTest
: public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SoundContentSettingObserverFencedFrameBrowserTest,
AddAutoplayFlagsInFencedFrame) { … }