Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/quota/test/gtest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 4 kB image not shown  

Quelle  QuotaManagerTestHelpers.h   Sprache: C

 
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "nsStringFwd.h"

namespace mozilla::dom::quota {

struct PrincipalMetadata;
struct OriginMetadata;
struct FullOriginMetadata;

namespace test {

/**
 * Creates a PrincipalMetadata object for a principal without an origin suffix.
 *
 * This function takes a group (without suffix) and origin (without suffix) and
 * returns a PrincipalMetadata object with these values. The suffix and private
 * browsing flag are set to their default values: an empty string and false,
 * respectively.
 *
 * @param aGroupNoSuffix The group associated with the principal, without the
 * suffix.
 * @param aOriginNoSuffix The origin without the suffix.
 *
 * @returns A PrincipalMetadata object containing the given group and origin,
 * with an empty origin suffix and a false private browsing flag.
 */

PrincipalMetadata GetPrincipalMetadata(const nsCString& aGroupNoSuffix,
                                       const nsCString& aOriginNoSuffix);

/**
 * Creates a PrincipalMetadata object for a principal with an origin suffix.
 *
 * This function takes an origin suffix, a group (without suffix), and an origin
 * (without suffix), and returns a PrincipalMetadata object with these values,
 * including the origin suffix. The private browsing flag is set to false by
 * default.
 *
 * @param aOriginSuffix The suffix to be added to the group and origin.
 * @param aGroupNoSuffix The group associated with the principal, without the
 * suffix.
 * @param aOriginNoSuffix The origin without the suffix.
 *
 * @returns A PrincipalMetadata object containing the given suffix, group, and
 * origin, with a false private browsing flag.
 */

PrincipalMetadata GetPrincipalMetadata(const nsCString& aOriginSuffix,
                                       const nsCString& aGroupNoSuffix,
                                       const nsCString& aOriginNoSuffix);

/**
 * Creates an OriginMetadata object for a principal with an origin suffix.
 *
 * This function takes the same parameters as GetPrincipalMetadata, but
 * returns an OriginMetadata object. The additional fields in OriginMetadata
 * are set as follows:
 * - The PERSISTENCE_TYPE_DEFAULT is used as the persistence type.
 *
 * @param aOriginSuffix The suffix to be added to the group and origin.
 * @param aGroupNoSuffix The group associated with the principal, without the
 * suffix.
 * @param aOriginNoSuffix The origin without the suffix.
 *
 * @returns An OriginMetadata object containing the principal metadata from
 * GetPrincipalMetadata, with the PERSISTENCE_TYPE_DEFAULT persistence type.
 */

OriginMetadata GetOriginMetadata(const nsCString& aOriginSuffix,
                                 const nsCString& aGroupNoSuffix,
                                 const nsCString& aOriginNoSuffix);

/**
 * Creates a FullOriginMetadata object for a principal with an origin suffix.
 *
 * This function takes the same parameters as GetOriginMetadata, but returns
 * a FullOriginMetadata object. The additional fields in FullOriginMetadata
 * are set as follows:
 * - The false value is used for the persisted flag.
 * - The 0 value is used for the last access time.
 *
 * @param aOriginSuffix The suffix to be added to the group and origin.
 * @param aGroupNoSuffix The group associated with the principal, without the
 * suffix.
 * @param aOriginNoSuffix The origin without the suffix.
 *
 * @returns A FullOriginMetadata object containing the origin metadata from
 * GetOriginMetadata, with a false persisted flag and a zero last access time.
 */

FullOriginMetadata GetFullOriginMetadata(const nsCString& aOriginSuffix,
                                         const nsCString& aGroupNoSuffix,
                                         const nsCString& aOriginNoSuffix);

}  //  namespace test
}  //  namespace mozilla::dom::quota

Messung V0.5
C=92 H=100 G=95

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.