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

Unified Diff: remoting/host/client_session_unittest.cc

Issue 2080723008: [Chromoting] Use device::PowerSaveBlocker to block screen saver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 years, 6 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: remoting/host/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index c38021a50c3ae3083f5f8b95c0b43b4a8e36773a..f91e93fb046fae6f9d51ec9967f7e461ed5163fb 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -96,7 +96,9 @@ protocol::ClipboardEvent MakeClipboardEvent(const std::string& text) {
class ClientSessionTest : public testing::Test {
public:
- ClientSessionTest() : client_jid_("user@domain/rest-of-jid") {}
+ ClientSessionTest()
+ : message_loop_(base::MessageLoop::TYPE_IO),
+ client_jid_("user@domain/rest-of-jid") {}
void SetUp() override;
void TearDown() override;
@@ -169,7 +171,7 @@ void ClientSessionTest::TearDown() {
// Clear out |task_runner_| reference so the loop can quit, and run it until
// it does.
task_runner_ = nullptr;
- run_loop_.Run();
+ run_loop_.QuitWhenIdle();
}
void ClientSessionTest::CreateClientSession() {
@@ -186,8 +188,8 @@ void ClientSessionTest::CreateClientSession() {
connection_ = connection.get();
client_session_.reset(new ClientSession(
+ *ChromotingHostContext::CreateForTest(task_runner_),
&session_event_handler_,
- task_runner_, // Audio thread.
std::move(connection), desktop_environment_factory_.get(),
base::TimeDelta(), nullptr, extensions_));
}
@@ -416,7 +418,7 @@ TEST_F(ClientSessionTest, Extensions) {
message4.set_data("data");
client_session_->DeliverClientMessage(message4);
- base::RunLoop().RunUntilIdle();
+ base::RunLoop().QuitWhenIdle();
// ext1 was instantiated and sent a message, and did not wrap anything.
EXPECT_TRUE(extension1.was_instantiated());

Powered by Google App Engine
This is Rietveld 408576698