generate-inputs-with-flags.json-TestReplayInputs.h [plain text]
#pragma once
#if ENABLE(WEB_REPLAY)
#include "InternalNamespaceHeaderIncludeDummy.h"
#include <platform/ExternalNamespaceHeaderIncludeDummy.h>
namespace Test {
class ScalarInput1;
class ScalarInput2;
}
namespace JSC {
template<> struct TEST_EXPORT_MACRO InputTraits<Test::ScalarInput1> {
static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
static const String& type();
static void encode(JSC::EncodedValue&, const Test::ScalarInput1&);
static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::ScalarInput1>&);
};
template<> struct TEST_EXPORT_MACRO InputTraits<Test::ScalarInput2> {
static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
static const String& type();
static void encode(JSC::EncodedValue&, const Test::ScalarInput2&);
static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::ScalarInput2>&);
};
}
namespace Test {
class ScalarInput1 : public NondeterministicInput<ScalarInput1> {
public:
TEST_EXPORT_MACRO ScalarInput1(ScalarType data);
virtual ~ScalarInput1();
ScalarType data() const { return m_data; }
private:
ScalarType m_data;
};
class ScalarInput2 : public NondeterministicInput<ScalarInput2> {
public:
TEST_EXPORT_MACRO ScalarInput2(ScalarType data);
virtual ~ScalarInput2();
ScalarType data() const { return m_data; }
private:
ScalarType m_data;
};
}
SPECIALIZE_TYPE_TRAITS_BEGIN(Test::ScalarInput1)
static bool isType(const NondeterministicInputBase& input) { return input.type() == InputTraits<Test::ScalarInput1>::type(); }
SPECIALIZE_TYPE_TRAITS_END()
SPECIALIZE_TYPE_TRAITS_BEGIN(Test::ScalarInput2)
static bool isType(const NondeterministicInputBase& input) { return input.type() == InputTraits<Test::ScalarInput2>::type(); }
SPECIALIZE_TYPE_TRAITS_END()
#define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
macro(ScalarInput1) \
macro(ScalarInput2) \
\
#endif // ENABLE(WEB_REPLAY)