Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp

Issue 2484273003: [Presentation API] (1-UA) fire PresentationConnection onterminate event if receiver page gets destr… (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 7 #include <memory>
8 8
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/V8BindingForTesting.h" 10 #include "bindings/core/v8/V8BindingForTesting.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const WebString& presentationId, 84 const WebString& presentationId,
85 const uint8_t* data, 85 const uint8_t* data,
86 size_t length, 86 size_t length,
87 const WebPresentationConnectionProxy* proxy)); 87 const WebPresentationConnectionProxy* proxy));
88 88
89 MOCK_METHOD3(closeSession, 89 MOCK_METHOD3(closeSession,
90 void(const WebURL& presentationUrl, 90 void(const WebURL& presentationUrl,
91 const WebString& presentationId, 91 const WebString& presentationId,
92 const WebPresentationConnectionProxy*)); 92 const WebPresentationConnectionProxy*));
93 93
94 MOCK_METHOD2(terminateSession, 94 MOCK_METHOD2(terminateConnection,
95 void(const WebURL& presentationUrl, 95 void(const WebURL& presentationUrl,
96 const WebString& presentationId)); 96 const WebString& presentationId));
97 97
98 MOCK_METHOD2(getAvailability_, 98 MOCK_METHOD2(getAvailability_,
99 void(const WebVector<WebURL>& availabilityUrls, 99 void(const WebVector<WebURL>& availabilityUrls,
100 std::unique_ptr<WebPresentationAvailabilityCallbacks>&)); 100 std::unique_ptr<WebPresentationAvailabilityCallbacks>&));
101 101
102 MOCK_METHOD1(startListening, void(WebPresentationAvailabilityObserver*)); 102 MOCK_METHOD1(startListening, void(WebPresentationAvailabilityObserver*));
103 103
104 MOCK_METHOD1(stopListening, void(WebPresentationAvailabilityObserver*)); 104 MOCK_METHOD1(stopListening, void(WebPresentationAvailabilityObserver*));
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 TEST_F(PresentationReceiverTest, CreateReceiver) { 220 TEST_F(PresentationReceiverTest, CreateReceiver) {
221 MockWebPresentationClient client; 221 MockWebPresentationClient client;
222 EXPECT_CALL(client, setReceiver(testing::_)); 222 EXPECT_CALL(client, setReceiver(testing::_));
223 223
224 V8TestingScope scope; 224 V8TestingScope scope;
225 new PresentationReceiver(&scope.frame(), &client); 225 new PresentationReceiver(&scope.frame(), &client);
226 } 226 }
227 227
228 } // namespace blink 228 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698