chromium/chrome/renderer/autofill/password_generation_test_utils.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/renderer/autofill/password_generation_test_utils.h"

#include "base/strings/escape.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/password_generation_agent.h"
#include "components/autofill/core/common/password_form_generation_data.h"
#include "components/autofill/core/common/signatures.h"
#include "components/autofill/core/common/unique_ids.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_form_element.h"

WebDocument;
WebElement;
WebFormControlElement;
WebFormElement;
WebString;
WebVector;

namespace autofill {

namespace {

// Events that should be triggered when Chrome fills a field.
const char* const kEvents[] =;

// Returns renderer id of WebInput element with id attribute `input_id`.
autofill::FieldRendererId GetRendererId(WebDocument document,
                                        const char* input_id) {}

}  // namespace

void SetFoundFormEligibleForGeneration(
    PasswordGenerationAgent* generation_agent,
    WebDocument document,
    const char* new_password_id,
    const char* confirm_password_id) {}

// Creates script that registers event listeners for `element_name` field. To
// check whether the listeners are called, check that the variables from
// `variables_to_check` are set to 1.
std::string CreateScriptToRegisterListeners(
    const char* const element_name,
    std::vector<std::u16string>* variables_to_check) {}

}  // namespace autofill