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

Unified Diff: base/trace_event/process_memory_totals_dump_provider_unittest.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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: base/trace_event/process_memory_totals_dump_provider_unittest.cc
diff --git a/base/trace_event/process_memory_totals_dump_provider_unittest.cc b/base/trace_event/process_memory_totals_dump_provider_unittest.cc
deleted file mode 100644
index 4a600361045e7240b5a5ac1065d1ccd327124809..0000000000000000000000000000000000000000
--- a/base/trace_event/process_memory_totals_dump_provider_unittest.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/trace_event/process_memory_totals_dump_provider.h"
-
-#include "base/trace_event/process_memory_dump.h"
-#include "base/trace_event/process_memory_totals.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace trace_event {
-
-TEST(ProcessMemoryTotalsDumpProviderTest, DumpRSS) {
- auto mdptp = ProcessMemoryTotalsDumpProvider::GetInstance();
- scoped_ptr<ProcessMemoryDump> pmd_before(new ProcessMemoryDump());
- scoped_ptr<ProcessMemoryDump> pmd_after(new ProcessMemoryDump());
-
- ProcessMemoryTotalsDumpProvider::rss_bytes_for_testing = 1024;
- mdptp->DumpInto(pmd_before.get());
-
- // Pretend that the RSS of the process increased of +1M.
- const size_t kAllocSize = 1048576;
- ProcessMemoryTotalsDumpProvider::rss_bytes_for_testing += kAllocSize;
-
- mdptp->DumpInto(pmd_after.get());
-
- ProcessMemoryTotalsDumpProvider::rss_bytes_for_testing = 0;
-
- ASSERT_TRUE(pmd_before->has_process_totals());
- ASSERT_TRUE(pmd_after->has_process_totals());
-
- const uint64 rss_before = pmd_before->process_totals()->resident_set_bytes();
- const uint64 rss_after = pmd_after->process_totals()->resident_set_bytes();
-
- EXPECT_NE(0U, rss_before);
- EXPECT_NE(0U, rss_after);
-
- EXPECT_EQ(rss_after - rss_before, kAllocSize);
-}
-
-} // namespace trace_Event
-} // namespace base
« no previous file with comments | « base/trace_event/process_memory_totals_dump_provider.cc ('k') | base/trace_event/trace_event_synthetic_delay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698