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

Unified Diff: remoting/host/process_stats_sender_unittest.cc

Issue 2964613002: [Chromoting] Deprecate AggregatedProcessResourceUsage.* (Closed)
Patch Set: Created 3 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/process_stats_sender_unittest.cc
diff --git a/remoting/host/process_stats_sender_unittest.cc b/remoting/host/process_stats_sender_unittest.cc
index 6d08818c5343271c10557df58b0c051dd8bf6661..7d5a70a2a81e46c44ced1067718752b90487c676 100644
--- a/remoting/host/process_stats_sender_unittest.cc
+++ b/remoting/host/process_stats_sender_unittest.cc
@@ -76,9 +76,10 @@ class FakeProcessStatsAgent : public ProcessStatsAgent {
static void AssertExpected(
const protocol::AggregatedProcessResourceUsage& usage,
size_t index) {
- ASSERT_EQ(usage.processor_usage(), index);
- ASSERT_EQ(usage.working_set_size(), index);
- ASSERT_EQ(usage.pagefile_size(), index);
+ ASSERT_EQ(usage.usages_size(), 1);
+ ASSERT_EQ(usage.usages().Get(0).processor_usage(), index);
joedow 2017/06/30 15:13:43 Do you want to ASSERT on processor_name as well?
Hzj_jie 2017/06/30 22:39:29 Done.
+ ASSERT_EQ(usage.usages().Get(0).working_set_size(), index);
+ ASSERT_EQ(usage.usages().Get(0).pagefile_size(), index);
}
static void AssertExpected(const protocol::ProcessResourceUsage& usage,
@@ -169,7 +170,7 @@ TEST(ProcessStatsSenderTest, MergeUsage) {
ASSERT_EQ(stub.received().size(), 10U);
for (size_t i = 0; i < stub.received().size(); i++) {
- FakeProcessStatsAgent::AssertExpected(stub.received()[i], i * 2);
+ ASSERT_EQ(stub.received()[i].usages_size(), 2);
for (int j = 0; j < stub.received()[i].usages_size(); j++) {
FakeProcessStatsAgent::AssertExpected(
stub.received()[i].usages().Get(j), i);

Powered by Google App Engine
This is Rietveld 408576698