#include "chrome/browser/screen_ai/screen_ai_service_router.h"
#include <optional>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/task/thread_pool.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/screen_ai/screen_ai_service_router_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/test/browser_test.h"
#include "services/screen_ai/buildflags/buildflags.h"
#include "services/screen_ai/public/cpp/utilities.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_features.mojom-features.h"
namespace {
enum class LibraryAvailablity { … };
class ResultsWaiter { … };
base::FilePath GetComponentBinaryPath() { … }
}
namespace screen_ai {
class ScreenAIServiceRouterTest
: public InProcessBrowserTest,
public testing::WithParamInterface<
std::tuple<LibraryAvailablity, bool, bool>> { … };
IN_PROC_BROWSER_TEST_P(ScreenAIServiceRouterTest, OCRInitialization) { … }
IN_PROC_BROWSER_TEST_P(ScreenAIServiceRouterTest,
MainContentExtractionInitialization) { … }
IN_PROC_BROWSER_TEST_P(ScreenAIServiceRouterTest, MixedInitialization) { … }
IN_PROC_BROWSER_TEST_P(ScreenAIServiceRouterTest,
MixedInitializationWithoutWait) { … }
IN_PROC_BROWSER_TEST_P(ScreenAIServiceRouterTest,
RepeatedInitializationWithoutWait) { … }
INSTANTIATE_TEST_SUITE_P(…);
}