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

Unified Diff: content/browser/presentation/presentation_service_impl_unittest.cc

Issue 1466573002: Presentation API: implement renderer side of PresentationConnection.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/presentation/presentation_service_impl_unittest.cc
diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
index f1b4d0ac74a31442ec6e14aa449e27d7ded42100..edab0414ce6661235c407565cce291b7e6513132 100644
--- a/content/browser/presentation/presentation_service_impl_unittest.cc
+++ b/content/browser/presentation/presentation_service_impl_unittest.cc
@@ -107,6 +107,10 @@ class MockPresentationServiceDelegate : public PresentationServiceDelegate {
void(int render_process_id,
int render_frame_id,
const std::string& presentation_id));
+ MOCK_METHOD3(TerminateSession,
+ void(int render_process_id,
+ int render_frame_id,
+ const std::string& presentation_id));
MOCK_METHOD4(ListenForSessionMessages,
void(int render_process_id,
int render_frame_id,
@@ -546,6 +550,14 @@ TEST_F(PresentationServiceImplTest, CloseSession) {
run_loop.Run();
}
+TEST_F(PresentationServiceImplTest, TerminateSession) {
+ service_ptr_->TerminateSession(kPresentationUrl, kPresentationId);
+ base::RunLoop run_loop;
+ EXPECT_CALL(mock_delegate_, TerminateSession(_, _, Eq(kPresentationId)))
+ .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
+ run_loop.Run();
+}
+
TEST_F(PresentationServiceImplTest, ListenForSessionMessagesPassed) {
std::string text_msg("123");
std::vector<uint8_t> binary_data(3, '\1');

Powered by Google App Engine
This is Rietveld 408576698