webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
generate-input-with-guard.json-TestReplayInputs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
15  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
17  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26 
27 // DO NOT EDIT THIS FILE. It is automatically generated from generate-input-with-guard.json
28 // by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
29 
30 #pragma once
31 
32 #if ENABLE(WEB_REPLAY)
33 #include "InternalNamespaceHeaderIncludeDummy.h"
34 #include <platform/ExternalNamespaceHeaderIncludeDummy.h>
35 
36 
37 
38 namespace Test {
39 #if ENABLE(DUMMY_FEATURE)
40 class GetCurrentTime;
41 #endif // ENABLE(DUMMY_FEATURE)
42 class SetRandomSeed;
43 } // namespace Test
44 
45 namespace JSC {
46 #if ENABLE(DUMMY_FEATURE)
47 template<> struct TEST_EXPORT_MACRO InputTraits<Test::GetCurrentTime> {
48  static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
49  static const String& type();
50 
51  static void encode(JSC::EncodedValue&, const Test::GetCurrentTime&);
52  static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::GetCurrentTime>&);
53 };
54 #endif // ENABLE(DUMMY_FEATURE)
55 
56 template<> struct TEST_EXPORT_MACRO InputTraits<Test::SetRandomSeed> {
57  static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
58  static const String& type();
59 
60  static void encode(JSC::EncodedValue&, const Test::SetRandomSeed&);
61  static bool decode(JSC::EncodedValue&, std::unique_ptr<Test::SetRandomSeed>&);
62 };
63 
64 } // namespace JSC
65 
66 namespace Test {
67 #if ENABLE(DUMMY_FEATURE)
68 class GetCurrentTime : public NondeterministicInput<GetCurrentTime> {
69 public:
70  TEST_EXPORT_MACRO GetCurrentTime(double currentTime);
71  virtual ~GetCurrentTime();
72 
73  double currentTime() const { return m_currentTime; }
74 private:
75  double m_currentTime;
76 };
77 #endif // ENABLE(DUMMY_FEATURE)
78 
79 class SetRandomSeed : public NondeterministicInput<SetRandomSeed> {
80 public:
81  TEST_EXPORT_MACRO SetRandomSeed(uint64_t randomSeed);
82  virtual ~SetRandomSeed();
83 
84  uint64_t randomSeed() const { return m_randomSeed; }
85 private:
86  uint64_t m_randomSeed;
87 };
88 } // namespace Test
89 
90 #if ENABLE(DUMMY_FEATURE)
92  static bool isType(const NondeterministicInputBase& input) { return input.type() == InputTraits<Test::GetCurrentTime>::type(); }
94 #endif // ENABLE(DUMMY_FEATURE)
95 
96 SPECIALIZE_TYPE_TRAITS_BEGIN(Test::SetRandomSeed)
97  static bool isType(const NondeterministicInputBase& input) { return input.type() == InputTraits<Test::SetRandomSeed>::type(); }
99 
100 #define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
101  macro(GetCurrentTime) \
102  macro(SetRandomSeed) \
103  \
104 // end of TEST_REPLAY_INPUT_NAMES_FOR_EACH
105 
106 #endif // ENABLE(WEB_REPLAY)
short encode(IlbcEncoder *iLBCenc_inst, int16_t *encoded_data, int16_t *data)
Definition: iLBC_testprogram.c:42
WTF_EXPORT_PRIVATE double currentTime()
Definition: CurrentTime.cpp:237
unsigned long long uint64_t
Definition: ptypes.h:120
s decode
Definition: plot_neteq_delay.m:61
Definition: AirOpcode.h:4
void GetCurrentTime(int64 *seconds, int32 *nanos)
Definition: time.cc:264
#define SPECIALIZE_TYPE_TRAITS_BEGIN(ClassName)
Definition: TypeCasts.h:94
EGLenum type
Definition: eglext.h:63
Definition: bn_test.cc:620
string input
Definition: tokenizer_unittest.cc:198
#define SPECIALIZE_TYPE_TRAITS_END()
Definition: TypeCasts.h:102
AVCFPlayerRef CMTime dispatch_queue_t queue
Definition: AVFoundationCFSoftLinking.h:135