#include <memory>
#include <string>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/extensions/chooser_dialog_view.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/permissions/fake_bluetooth_chooser_controller.h"
#include "components/permissions/fake_usb_chooser_controller.h"
#include "content/public/test/browser_test.h"
namespace {
void ShowChooserBubble(
Browser* browser,
std::unique_ptr<permissions::ChooserController> controller) { … }
void ShowChooserModal(
Browser* browser,
std::unique_ptr<permissions::ChooserController> controller) { … }
void ShowChooser(const std::string& test_name,
Browser* browser,
std::unique_ptr<permissions::ChooserController> controller) { … }
}
class UsbChooserBrowserTest : public DialogBrowserTest { … };
IN_PROC_BROWSER_TEST_F(UsbChooserBrowserTest, InvokeUi_NoDevicesBubble) { … }
IN_PROC_BROWSER_TEST_F(UsbChooserBrowserTest, InvokeUi_NoDevicesModal) { … }
IN_PROC_BROWSER_TEST_F(UsbChooserBrowserTest, InvokeUi_WithDevicesBubble) { … }
IN_PROC_BROWSER_TEST_F(UsbChooserBrowserTest, InvokeUi_WithDevicesModal) { … }
class BluetoothChooserBrowserTest : public DialogBrowserTest { … };
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest,
InvokeUi_UnavailableBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_UnavailableModal) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_NoDevicesBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_NoDevicesModal) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_ScanningBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_ScanningModal) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest,
InvokeUi_ScanningWithDevicesBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest,
InvokeUi_ScanningWithDevicesModal) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_ConnectedBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_ConnectedModal) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_PairedBubble) { … }
IN_PROC_BROWSER_TEST_F(BluetoothChooserBrowserTest, InvokeUi_PairedModal) { … }