#include <stddef.h>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/javascript_dialogs/app_modal_dialog_controller.h"
#include "components/javascript_dialogs/app_modal_dialog_manager.h"
#include "components/javascript_dialogs/app_modal_dialog_queue.h"
#include "components/javascript_dialogs/app_modal_dialog_view.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/isolated_world_ids.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/extension_host.h"
#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
namespace extensions {
namespace {
void GetNextDialog(javascript_dialogs::AppModalDialogView** view) { … }
void CloseDialog() { … }
void AcceptDialog() { … }
void CancelDialog() { … }
void CheckAlertResult(const std::string& dialog_name,
size_t* call_count,
base::Value value) { … }
void CheckConfirmResult(const std::string& dialog_name,
bool expected_value,
size_t* call_count,
base::Value value) { … }
}
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) { … }
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertQueue) { … }
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ConfirmQueue) { … }
IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
DialogTitleShowsExtensionNameWithPrefix) { … }
}