generate-input-with-guard.json-TestReplayInputs.cpp [plain text]
#include "config.h"
#include "generate-input-with-guard.json-TestReplayInputs.h"
#if ENABLE(WEB_REPLAY)
#include "InternalNamespaceImplIncludeDummy.h"
#include <platform/ExternalNamespaceImplIncludeDummy.h>
namespace Test {
#if ENABLE(DUMMY_FEATURE)
GetCurrentTime::GetCurrentTime(double currentTime)
: NondeterministicInput<GetCurrentTime>()
, m_currentTime(currentTime)
{
}
GetCurrentTime::~GetCurrentTime()
{
}
#endif // ENABLE(DUMMY_FEATURE)
SetRandomSeed::SetRandomSeed(uint64_t randomSeed)
: NondeterministicInput<SetRandomSeed>()
, m_randomSeed(randomSeed)
{
}
SetRandomSeed::~SetRandomSeed()
{
}
}
namespace JSC {
#if ENABLE(DUMMY_FEATURE)
const AtomicString& InputTraits<Test::GetCurrentTime>::type()
{
static NeverDestroyed<const AtomicString> type("GetCurrentTime", AtomicString::ConstructFromLiteral);
return type;
}
void InputTraits<Test::GetCurrentTime>::encode(EncodedValue& encodedValue, const Test::GetCurrentTime& input)
{
encodedValue.put<double>(ASCIILiteral("currentTime"), input.currentTime());
}
bool InputTraits<Test::GetCurrentTime>::decode(EncodedValue& encodedValue, std::unique_ptr<Test::GetCurrentTime>& input)
{
double currentTime;
if (!encodedValue.get<double>(ASCIILiteral("currentTime"), currentTime))
return false;
input = std::make_unique<Test::GetCurrentTime>(currentTime);
return true;
}
#endif // ENABLE(DUMMY_FEATURE)
const AtomicString& InputTraits<Test::SetRandomSeed>::type()
{
static NeverDestroyed<const AtomicString> type("SetRandomSeed", AtomicString::ConstructFromLiteral);
return type;
}
void InputTraits<Test::SetRandomSeed>::encode(EncodedValue& encodedValue, const Test::SetRandomSeed& input)
{
encodedValue.put<uint64_t>(ASCIILiteral("randomSeed"), input.randomSeed());
}
bool InputTraits<Test::SetRandomSeed>::decode(EncodedValue& encodedValue, std::unique_ptr<Test::SetRandomSeed>& input)
{
uint64_t randomSeed;
if (!encodedValue.get<uint64_t>(ASCIILiteral("randomSeed"), randomSeed))
return false;
input = std::make_unique<Test::SetRandomSeed>(randomSeed);
return true;
}
}
#endif // ENABLE(WEB_REPLAY)