#include "components/offline_pages/content/background_loader/background_loader_contents.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/synchronization/waitable_event.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/window_container_type.mojom-shared.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"
#include "third_party/blink/public/mojom/window_features/window_features.mojom.h"
#include "url/gurl.h"
namespace background_loader {
class BackgroundLoaderContentsTest : public testing::Test,
public BackgroundLoaderContents::Delegate { … };
BackgroundLoaderContentsTest::BackgroundLoaderContentsTest()
: … { … }
BackgroundLoaderContentsTest::~BackgroundLoaderContentsTest() { … }
void BackgroundLoaderContentsTest::SetUp() { … }
void BackgroundLoaderContentsTest::TearDown() { … }
void BackgroundLoaderContentsTest::CanDownload(
base::OnceCallback<void(bool)> callback) { … }
void BackgroundLoaderContentsTest::DownloadCallback(bool download) { … }
void BackgroundLoaderContentsTest::SetDelegate() { … }
void BackgroundLoaderContentsTest::MediaAccessCallback(
const blink::mojom::StreamDevicesSet& stream_devices_set,
blink::mojom::MediaStreamRequestResult result,
std::unique_ptr<content::MediaStreamUI> ui) { … }
TEST_F(BackgroundLoaderContentsTest, NotVisible) { … }
TEST_F(BackgroundLoaderContentsTest, SuppressDialogs) { … }
TEST_F(BackgroundLoaderContentsTest, DoesNotFocusAfterCrash) { … }
TEST_F(BackgroundLoaderContentsTest, CannotDownloadNoDelegate) { … }
TEST_F(BackgroundLoaderContentsTest, CanDownload_DelegateCalledWhenSet) { … }
TEST_F(BackgroundLoaderContentsTest, ShouldNotCreateWebContents) { … }
TEST_F(BackgroundLoaderContentsTest, ShouldNotAddNewContents) { … }
TEST_F(BackgroundLoaderContentsTest, DoesNotGiveMediaAccessPermission) { … }
TEST_F(BackgroundLoaderContentsTest, CheckMediaAccessPermissionFalse) { … }
}