#include "chrome/test/chromedriver/prompt_behavior.h"
#include <memory>
#include <unordered_map>
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/status.h"
namespace prompt_behavior {
extern const char kAccept[] = …;
extern const char kAcceptAndNotify[] = …;
extern const char kDismiss[] = …;
extern const char kDismissAndNotify[] = …;
extern const char kIgnore[] = …;
}
namespace dialog_types {
extern const char kAlert[] = …;
extern const char kBeforeUnload[] = …;
extern const char kConfirm[] = …;
extern const char kPrompt[] = …;
}
PromptBehavior::PromptBehavior() : … { … }
PromptBehavior::PromptBehavior(bool w3c_compliant) { … }
namespace {
Status ParsePromptHandlerConfiguration(const std::string& type_str,
bool w3c_compliant,
PromptHandlerConfiguration& type) { … }
Status ParsePromptHandlerConfiguration(const base::Value* type_value,
bool w3c_compliant,
PromptHandlerConfiguration& type) { … }
Status GetDefaultHandlerConfiguration(
const std::string& dialog_type,
const base::Value::Dict& prompt_behavior_dict,
bool w3c_compliant,
PromptHandlerConfiguration& result) { … }
Status FillInHandlerConfiguration(const std::string& dialog_type,
const base::Value::Dict& prompt_behavior_dict,
bool w3c_compliant,
PromptHandlerConfiguration& result) { … }
}
Status PromptBehavior::Create(bool w3c_compliant,
const std::string& prompt_behavior_str,
PromptBehavior& result) { … }
Status PromptBehavior::Create(bool w3c_compliant, PromptBehavior& result) { … }
Status PromptBehavior::Create(bool w3c_compliant,
const base::Value::Dict& prompt_behavior_dict,
PromptBehavior& result) { … }
Status PromptBehavior::Create(bool w3c_compliant,
const base::Value& prompt_behavior_value,
PromptBehavior& result) { … }
Status PromptBehavior::GetConfiguration(
const std::string& dialog_type,
PromptHandlerConfiguration& handler_configuration) { … }
base::Value PromptBehavior::MapperOptionsView() { … }
base::Value PromptBehavior::CapabilityView() { … }