#include "chrome/browser/ui/media_router/presentation_receiver_window_controller.h"
#include <string>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/run_until.h"
#include "base/threading/thread_restrictions.h"
#include "base/timer/elapsed_timer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/media_router/browser/presentation/local_presentation_manager.h"
#include "components/media_router/browser/presentation/local_presentation_manager_factory.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/script_executor.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/filename_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/mojom/presentation/presentation.mojom.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
_;
Invoke;
namespace {
constexpr char kPresentationId[] = …;
const base::FilePath::StringPieceType kResourcePath = …);
base::RepeatingCallback<void(const std::string&)> GetNoopTitleChangeCallback() { … }
base::FilePath GetResourceFile(base::FilePath::StringPieceType relative_path) { … }
class FakeControllerConnection final
: public blink::mojom::PresentationConnection { … };
class ReceiverWindowDestroyer { … };
}
class PresentationReceiverWindowControllerBrowserTest
: public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PresentationReceiverWindowControllerBrowserTest,
CreatesWindow) { … }
IN_PROC_BROWSER_TEST_F(PresentationReceiverWindowControllerBrowserTest,
MANUAL_CreatesWindowOnGivenDisplay) { … }
IN_PROC_BROWSER_TEST_F(PresentationReceiverWindowControllerBrowserTest,
DISABLED_NavigationClosesWindow) { … }
IN_PROC_BROWSER_TEST_F(PresentationReceiverWindowControllerBrowserTest,
DISABLED_PresentationApiCommunication) { … }
IN_PROC_BROWSER_TEST_F(PresentationReceiverWindowControllerBrowserTest,
WindowClosingTerminatesPresentation) { … }