#include "content/browser/bluetooth/web_bluetooth_service_impl.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h"
#include "content/browser/bluetooth/web_bluetooth_service_impl.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/bluetooth_delegate.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_content_browser_client.h"
#include "content/public/test/content_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 "content/shell/browser/shell.h"
#include "content/test/test_web_contents.h"
#include "device/bluetooth/public/cpp/bluetooth_uuid.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/bluetooth/test/mock_bluetooth_device.h"
#include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
#include "url/gurl.h"
_;
Mock;
Return;
namespace content {
namespace {
constexpr char kDeviceAddress[] = …;
constexpr char kHeartRateUUIDString[] = …;
PromptEventCallback;
class FakeBluetoothScanningPrompt : public BluetoothScanningPrompt { … };
class FakeBluetoothAdapter : public device::MockBluetoothAdapter { … };
class FakeBluetoothChooser : public content::BluetoothChooser { … };
class TestBluetoothDelegate : public BluetoothDelegate { … };
class TestContentBrowserClient : public ContentBrowserTestContentBrowserClient { … };
}
class WebBluetoothServiceImplBrowserTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebBluetoothServiceImplBrowserTest,
NoShowBluetoothScanningPromptInPrerendering) { … }
IN_PROC_BROWSER_TEST_F(WebBluetoothServiceImplBrowserTest,
RequestDeviceInPrerendering) { … }
IN_PROC_BROWSER_TEST_F(WebBluetoothServiceImplBrowserTest,
GetBluetoothAllowedNotCalledInPrerendering) { … }
IN_PROC_BROWSER_TEST_F(WebBluetoothServiceImplBrowserTest,
ConsoleLogFromSourceFrame) { … }
class WebBluetoothServiceImplFencedFramesBrowserTest
: public WebBluetoothServiceImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebBluetoothServiceImplFencedFramesBrowserTest,
BlockFromFencedFrame) { … }
}