Index: content/renderer/presentation/presentation_dispatcher.h |
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h |
index 91dba496d155dc24794d8787758765810999181c..6b6e1b337219f98aabc8e2708eeaabe167d340fa 100644 |
--- a/content/renderer/presentation/presentation_dispatcher.h |
+++ b/content/renderer/presentation/presentation_dispatcher.h |
@@ -36,6 +36,8 @@ class WebVector; |
namespace content { |
+class TestPresentationDispatcher; |
+ |
// PresentationDispatcher is a delegate for Presentation API messages used by |
// Blink. It forwards the calls to the Mojo PresentationService. |
class CONTENT_EXPORT PresentationDispatcher |
@@ -47,6 +49,21 @@ class CONTENT_EXPORT PresentationDispatcher |
~PresentationDispatcher() override; |
private: |
+ friend class TestPresentationDispatcher; |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestStartSession); |
mark a. foltz
2017/01/03 18:39:19
Do these test cases actually use private members o
takumif
2017/01/03 23:29:50
Yes, PresentationDispatcher implements the methods
|
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestStartSessionError); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestJoinSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestJoinSessionError); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendString); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendArrayBuffer); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestSendBlobData); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestCloseSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, TestTerminateSession); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, |
+ TestListenForScreenAvailability); |
+ FRIEND_TEST_ALL_PREFIXES(PresentationDispatcherTest, |
+ TestSetDefaultPresentationUrls); |
+ |
struct SendMessageRequest { |
SendMessageRequest(blink::mojom::PresentationSessionInfoPtr session_info, |
blink::mojom::ConnectionMessagePtr message); |
@@ -137,7 +154,7 @@ class CONTENT_EXPORT PresentationDispatcher |
void DoSendMessage(SendMessageRequest* request); |
void HandleSendMessageRequests(bool success); |
- void ConnectToPresentationServiceIfNeeded(); |
+ virtual void ConnectToPresentationServiceIfNeeded(); |
void UpdateListeningState(); |