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

Unified Diff: mojo/common/common_custom_types_unittest.cc

Issue 2822593002: [Memory UMA] Return the extra_processes_dump map as part of the ResponseCallback (Closed)
Patch Set: Fixing the return type (adding the missing ref) Created 3 years, 8 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
« no previous file with comments | « mojo/common/common_custom_types_struct_traits.h ('k') | mojo/common/process_id.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/common_custom_types_unittest.cc
diff --git a/mojo/common/common_custom_types_unittest.cc b/mojo/common/common_custom_types_unittest.cc
index b0943783879967e50a947624e50cb1e64aa79506..fd0cad1eed3733f5ae0250037bd629a1b5d62b6f 100644
--- a/mojo/common/common_custom_types_unittest.cc
+++ b/mojo/common/common_custom_types_unittest.cc
@@ -7,9 +7,12 @@
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/numerics/safe_math.h"
+#include "base/process/process_handle.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "mojo/common/common_custom_types_struct_traits.h"
+#include "mojo/common/process_id.mojom.h"
#include "mojo/common/test_common_custom_types.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -226,6 +229,15 @@ TEST_F(CommonCustomTypesTest, UnguessableToken) {
run_loop.Run();
}
+TEST_F(CommonCustomTypesTest, ProcessId) {
+ base::ProcessId pid = base::GetCurrentProcId();
+ base::ProcessId out_pid = base::kNullProcessId;
+ ASSERT_NE(pid, out_pid);
+ EXPECT_TRUE(mojom::ProcessId::Deserialize(mojom::ProcessId::Serialize(&pid),
+ &out_pid));
+ EXPECT_EQ(pid, out_pid);
+}
+
TEST_F(CommonCustomTypesTest, Time) {
base::RunLoop run_loop;
« no previous file with comments | « mojo/common/common_custom_types_struct_traits.h ('k') | mojo/common/process_id.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698