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

Side by Side Diff: mojo/edk/system/handle_table_unittest.cc

Issue 2930103002: Correctly initialize MemoryDumpArgs in the MojoHandleTable test. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/edk/system/handle_table.h" 5 #include "mojo/edk/system/handle_table.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/trace_event/memory_allocator_dump.h" 10 #include "base/trace_event/memory_allocator_dump.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 TEST(HandleTableTest, OnMemoryDump) { 57 TEST(HandleTableTest, OnMemoryDump) {
58 HandleTable ht; 58 HandleTable ht;
59 59
60 { 60 {
61 base::AutoLock auto_lock(ht.GetLock()); 61 base::AutoLock auto_lock(ht.GetLock());
62 scoped_refptr<mojo::edk::Dispatcher> dispatcher( 62 scoped_refptr<mojo::edk::Dispatcher> dispatcher(
63 new FakeMessagePipeDispatcher); 63 new FakeMessagePipeDispatcher);
64 ht.AddDispatcher(dispatcher); 64 ht.AddDispatcher(dispatcher);
65 } 65 }
66 66
67 base::trace_event::MemoryDumpArgs args; 67 base::trace_event::MemoryDumpArgs args = {
68 base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
68 base::trace_event::ProcessMemoryDump pmd(nullptr, args); 69 base::trace_event::ProcessMemoryDump pmd(nullptr, args);
69 ht.OnMemoryDump(args, &pmd); 70 ht.OnMemoryDump(args, &pmd);
70 71
71 CheckNameAndValue(&pmd, "mojo/message_pipe", "1"); 72 CheckNameAndValue(&pmd, "mojo/message_pipe", "1");
72 CheckNameAndValue(&pmd, "mojo/data_pipe_consumer", "0"); 73 CheckNameAndValue(&pmd, "mojo/data_pipe_consumer", "0");
73 } 74 }
74 75
75 } // namespace edk 76 } // namespace edk
76 } // namespace mojo 77 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698