OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/presentation/PresentationReceiver.h" | 5 #include "modules/presentation/PresentationReceiver.h" |
6 | 6 |
| 7 #include <v8.h> |
| 8 #include <memory> |
7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
8 #include "bindings/core/v8/V8BindingForTesting.h" | 10 #include "bindings/core/v8/V8BindingForTesting.h" |
9 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
10 #include "core/testing/DummyPageHolder.h" | 12 #include "core/testing/DummyPageHolder.h" |
11 #include "modules/presentation/PresentationConnection.h" | 13 #include "modules/presentation/PresentationConnection.h" |
12 #include "modules/presentation/PresentationConnectionList.h" | 14 #include "modules/presentation/PresentationConnectionList.h" |
13 #include "platform/testing/URLTestHelpers.h" | 15 #include "platform/testing/URLTestHelpers.h" |
14 #include "public/platform/modules/presentation/WebPresentationClient.h" | 16 #include "public/platform/modules/presentation/WebPresentationClient.h" |
15 #include "public/platform/modules/presentation/WebPresentationConnectionCallback
s.h" | 17 #include "public/platform/modules/presentation/WebPresentationConnectionCallback
s.h" |
16 #include "public/platform/modules/presentation/WebPresentationConnectionProxy.h" | 18 #include "public/platform/modules/presentation/WebPresentationConnectionProxy.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
19 #include <memory> | |
20 #include <v8.h> | |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
24 class MockEventListener : public EventListener { | 24 class MockEventListener : public EventListener { |
25 public: | 25 public: |
26 MockEventListener() : EventListener(CPPEventListenerType) {} | 26 MockEventListener() : EventListener(CPPEventListenerType) {} |
27 | 27 |
28 bool operator==(const EventListener& other) const final { | 28 bool operator==(const EventListener& other) const final { |
29 return this == &other; | 29 return this == &other; |
30 } | 30 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 TEST_F(PresentationReceiverTest, CreateReceiver) { | 215 TEST_F(PresentationReceiverTest, CreateReceiver) { |
216 MockWebPresentationClient client; | 216 MockWebPresentationClient client; |
217 EXPECT_CALL(client, setReceiver(testing::_)); | 217 EXPECT_CALL(client, setReceiver(testing::_)); |
218 | 218 |
219 V8TestingScope scope; | 219 V8TestingScope scope; |
220 new PresentationReceiver(&scope.frame(), &client); | 220 new PresentationReceiver(&scope.frame(), &client); |
221 } | 221 } |
222 | 222 |
223 } // namespace blink | 223 } // namespace blink |
OLD | NEW |