| Index: Source/core/testing/ReadableStreamTestSource.h
|
| diff --git a/Source/core/testing/ReadableStreamTestSource.h b/Source/core/testing/ReadableStreamTestSource.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ee934ac88e40ba75e88ef0f4c0aacbacf472c3e
|
| --- /dev/null
|
| +++ b/Source/core/testing/ReadableStreamTestSource.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ReadableStreamTestSource_h
|
| +#define ReadableStreamTestSource_h
|
| +
|
| +#include "bindings/core/v8/ScriptState.h"
|
| +#include "bindings/core/v8/ScriptValue.h"
|
| +#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/streams/ReadableStreamController.h"
|
| +#include "core/streams/UnderlyingSourceBase.h"
|
| +#include "platform/heap/Handle.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ReadableStreamTestSource final : public UnderlyingSourceBase {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| +public:
|
| + ReadableStreamTestSource(ScriptState* scriptState) : UnderlyingSourceBase(scriptState) { }
|
| +
|
| + void enqueue(ScriptValue v) { controller()->enqueue(v); }
|
| + void close() { controller()->close(); }
|
| + void error(ScriptValue e) { controller()->error(e); }
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // ReadableStreamTestSource_h
|
|
|