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

Unified Diff: content/renderer/presentation/presentation_dispatcher_unittest.cc

Issue 2714693002: [Presentation API] Use connection proxy to change connection state to 'closed' (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/presentation/presentation_dispatcher_unittest.cc
diff --git a/content/renderer/presentation/presentation_dispatcher_unittest.cc b/content/renderer/presentation/presentation_dispatcher_unittest.cc
index ab2bf4d6dd1592e59ba3f0e8c012da6db26bf8b9..99c6954b41f557d5de66420a9f275cb6d1984e3e 100644
--- a/content/renderer/presentation/presentation_dispatcher_unittest.cc
+++ b/content/renderer/presentation/presentation_dispatcher_unittest.cc
@@ -124,6 +124,7 @@ class TestPresentationConnectionProxy : public PresentationConnectionProxy {
MOCK_CONST_METHOD2(SendConnectionMessageInternal,
void(blink::mojom::ConnectionMessage*,
const OnMessageCallback&));
+ MOCK_CONST_METHOD0(close, void());
};
class TestPresentationReceiver : public blink::WebPresentationReceiver {
@@ -506,9 +507,12 @@ TEST_F(PresentationDispatcherTest, TestOnReceiverConnectionAvailable) {
TEST_F(PresentationDispatcherTest, TestCloseSession) {
base::RunLoop run_loop;
+ TestPresentationConnection connection;
+ TestPresentationConnectionProxy test_proxy(&connection);
+ EXPECT_CALL(test_proxy, close());
EXPECT_CALL(presentation_service_,
CloseConnection(gurl1_, presentation_id_.utf8()));
- dispatcher_.closeSession(url1_, presentation_id_);
+ dispatcher_.closeSession(url1_, presentation_id_, &test_proxy);
run_loop.RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698