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

Unified Diff: remoting/host/policy_hack/policy_watcher_unittest.cc

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedbacks Created 6 years, 2 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/policy_hack/policy_watcher_unittest.cc
diff --git a/remoting/host/policy_hack/policy_watcher_unittest.cc b/remoting/host/policy_hack/policy_watcher_unittest.cc
index b19d92f4a3bd224e08a71894d4ed6273a88b42fe..7c5e3e3a230af81d37f26e37bb28a3510b061198 100644
--- a/remoting/host/policy_hack/policy_watcher_unittest.cc
+++ b/remoting/host/policy_hack/policy_watcher_unittest.cc
@@ -99,12 +99,14 @@ class PolicyWatcherTest : public testing::Test {
}
void StopWatching() {
- base::WaitableEvent stop_event(false, false);
- policy_watcher_->StopWatching(&stop_event);
+ EXPECT_CALL(*this, PostPolicyWatcherShutdown()).Times(1);
Wez 2014/10/17 17:58:01 You shouldn't mix call expectations in with actual
kelvinp 2014/10/20 00:21:18 I felt the same way when I saw the EXPECT_EQ in th
+ policy_watcher_->StopWatching(base::Bind(
+ &PolicyWatcherTest::PostPolicyWatcherShutdown, base::Unretained(this)));
base::RunLoop().RunUntilIdle();
- EXPECT_EQ(true, stop_event.IsSignaled());
}
+ MOCK_METHOD0(PostPolicyWatcherShutdown, void());
+
static const char* kHostDomain;
static const char* kPortRange;
base::MessageLoop message_loop_;

Powered by Google App Engine
This is Rietveld 408576698