#include "base/run_loop.h"
#include "base/test/run_until.h"
#include "build/build_config.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_manager.h"
#include "chrome/browser/media/webrtc/display_media_access_handler.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
bool FocusWidgetAndWait(content::WebContents* contents) { … }
}
class DisplayMediaAccessHandlerInteractiveUITest
: public WebRtcTestBase,
public testing::WithParamInterface<
std::tuple<bool, bool>>,
public DesktopMediaPickerManager::DialogObserver { … };
IN_PROC_BROWSER_TEST_P(DisplayMediaAccessHandlerInteractiveUITest,
PickerUiSelectsCorrectWindow) { … }
INSTANTIATE_TEST_SUITE_P(…);