diff options
Diffstat (limited to 'src/notification/xmpp_iq_stanza_handler_unittest.cc')
-rw-r--r-- | src/notification/xmpp_iq_stanza_handler_unittest.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/notification/xmpp_iq_stanza_handler_unittest.cc b/src/notification/xmpp_iq_stanza_handler_unittest.cc index 052b7c5..b159171 100644 --- a/src/notification/xmpp_iq_stanza_handler_unittest.cc +++ b/src/notification/xmpp_iq_stanza_handler_unittest.cc @@ -159,12 +159,13 @@ TEST_F(IqStanzaHandlerTest, OutOfOrderResponses) { TEST_F(IqStanzaHandlerTest, RequestTimeout) { bool called = false; - auto on_timeout = [&called]() { called = true; }; + auto on_timeout = [](bool* called) { *called = true; }; EXPECT_CALL(mock_xmpp_channel_, SendMessage(_)).Times(1); EXPECT_FALSE(called); - iq_stanza_handler_.SendRequest("set", "", "", "<body/>", {}, - base::Bind(on_timeout)); + iq_stanza_handler_.SendRequest( + "set", "", "", "<body/>", {}, + base::Bind(on_timeout, base::Unretained(&called))); task_runner_.Run(); EXPECT_TRUE(called); } |