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

Side by Side Diff: content/renderer/presentation/presentation_dispatcher_unittest.cc

Issue 2710703006: Remove unused PresentationServiceImpl message code (Closed)
Patch Set: Remove unused PresentationDispatcher test code Created 3 years, 10 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/public/test/test_browser_thread_bundle.h" 9 #include "content/public/test/test_browser_thread_bundle.h"
10 #include "content/renderer/presentation/presentation_connection_proxy.h" 10 #include "content/renderer/presentation/presentation_connection_proxy.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 MOCK_METHOD1(StopListeningForScreenAvailability, 69 MOCK_METHOD1(StopListeningForScreenAvailability,
70 void(const GURL& availability_url)); 70 void(const GURL& availability_url));
71 MOCK_METHOD2(StartSession, 71 MOCK_METHOD2(StartSession,
72 void(const std::vector<GURL>& presentation_urls, 72 void(const std::vector<GURL>& presentation_urls,
73 const StartSessionCallback& callback)); 73 const StartSessionCallback& callback));
74 MOCK_METHOD3(JoinSession, 74 MOCK_METHOD3(JoinSession,
75 void(const std::vector<GURL>& presentation_urls, 75 void(const std::vector<GURL>& presentation_urls,
76 const base::Optional<std::string>& presentation_id, 76 const base::Optional<std::string>& presentation_id,
77 const JoinSessionCallback& callback)); 77 const JoinSessionCallback& callback));
78 78
79 // *Internal method is to work around lack of support for move-only types in
80 // GMock.
81 void SendConnectionMessage(
82 const PresentationSessionInfo& session_info,
83 ConnectionMessagePtr message_request,
84 const SendConnectionMessageCallback& callback) override {
85 SendConnectionMessageInternal(session_info, message_request.get(),
86 callback);
87 }
88 MOCK_METHOD3(SendConnectionMessageInternal,
89 void(const PresentationSessionInfo& session_info,
90 ConnectionMessage* message_request,
91 const SendConnectionMessageCallback& callback));
92
93 MOCK_METHOD2(CloseConnection, 79 MOCK_METHOD2(CloseConnection,
94 void(const GURL& presentation_url, 80 void(const GURL& presentation_url,
95 const std::string& presentation_id)); 81 const std::string& presentation_id));
96 MOCK_METHOD2(Terminate, 82 MOCK_METHOD2(Terminate,
97 void(const GURL& presentation_url, 83 void(const GURL& presentation_url,
98 const std::string& presentation_id)); 84 const std::string& presentation_id));
99 85
100 MOCK_METHOD1(ListenForConnectionMessages, 86 MOCK_METHOD1(ListenForConnectionMessages,
101 void(const PresentationSessionInfo& session_info)); 87 void(const PresentationSessionInfo& session_info));
102 88
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 769
784 for (auto* mock_observer : mock_observers_) 770 for (auto* mock_observer : mock_observers_)
785 EXPECT_CALL(*mock_observer, availabilityChanged(false)); 771 EXPECT_CALL(*mock_observer, availabilityChanged(false));
786 772
787 base::RunLoop run_loop_2; 773 base::RunLoop run_loop_2;
788 ChangeURLState(gurl2_, URLState::Unavailable); 774 ChangeURLState(gurl2_, URLState::Unavailable);
789 run_loop_2.RunUntilIdle(); 775 run_loop_2.RunUntilIdle();
790 } 776 }
791 777
792 } // namespace content 778 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698