OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/streams/ReadableStream.h" | 6 #include "core/streams/ReadableStream.h" |
7 | 7 |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 return self->bindToV8Function(); | 38 return self->bindToV8Function(); |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 StringCapturingFunction(ScriptState* scriptState, String* value) | 42 StringCapturingFunction(ScriptState* scriptState, String* value) |
43 : ScriptFunction(scriptState) | 43 : ScriptFunction(scriptState) |
44 , m_value(value) | 44 , m_value(value) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 virtual ScriptValue call(ScriptValue value) OVERRIDE | 48 virtual ScriptValue call(ScriptValue value) override |
49 { | 49 { |
50 ASSERT(!value.isEmpty()); | 50 ASSERT(!value.isEmpty()); |
51 *m_value = toCoreString(value.v8Value()->ToString()); | 51 *m_value = toCoreString(value.v8Value()->ToString()); |
52 return value; | 52 return value; |
53 } | 53 } |
54 | 54 |
55 String* m_value; | 55 String* m_value; |
56 }; | 56 }; |
57 | 57 |
58 class MockUnderlyingSource : public GarbageCollectedFinalized<MockUnderlyingSour
ce>, public UnderlyingSource { | 58 class MockUnderlyingSource : public GarbageCollectedFinalized<MockUnderlyingSour
ce>, public UnderlyingSource { |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 } | 652 } |
653 | 653 |
654 TEST_F(ReadableStreamTest, ReadableArrayBufferCompileTest) | 654 TEST_F(ReadableStreamTest, ReadableArrayBufferCompileTest) |
655 { | 655 { |
656 // This test tests if ReadableStreamImpl<ArrayBuffer> can be instantiated. | 656 // This test tests if ReadableStreamImpl<ArrayBuffer> can be instantiated. |
657 new ReadableStreamImpl<ReadableStreamChunkTypeTraits<ArrayBuffer> >(scriptSt
ate()->executionContext(), m_underlyingSource); | 657 new ReadableStreamImpl<ReadableStreamChunkTypeTraits<ArrayBuffer> >(scriptSt
ate()->executionContext(), m_underlyingSource); |
658 } | 658 } |
659 | 659 |
660 } // namespace blink | 660 } // namespace blink |
661 | 661 |
OLD | NEW |