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

Unified Diff: mojo/edk/system/core_test_base.h

Issue 2001673003: EDK: Add Core::DuplicateHandleWithReducedRights(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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/edk/system/core.cc ('k') | mojo/edk/system/core_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core_test_base.h
diff --git a/mojo/edk/system/core_test_base.h b/mojo/edk/system/core_test_base.h
index 4dde782cfd8eab20752ab8e0a7571d13364fff6c..c1734ae8c8a9c0014e020c6aa366fa0a45e2684c 100644
--- a/mojo/edk/system/core_test_base.h
+++ b/mojo/edk/system/core_test_base.h
@@ -46,7 +46,8 @@ class CoreTestBase : public testing::Test {
void TearDown() override;
protected:
- // |info| must remain alive until the returned handle is closed.
+ // |info| must remain alive until the returned handle and any handles
+ // duplicated from it are closed.
MojoHandle CreateMockHandle(MockHandleInfo* info);
Core* core() { return core_.get(); }
@@ -66,6 +67,7 @@ class CoreTestBase_MockHandleInfo {
unsigned GetCtorCallCount() const;
unsigned GetDtorCallCount() const;
unsigned GetCloseCallCount() const;
+ unsigned GetDuplicateDispatcherCallCount() const;
unsigned GetWriteMessageCallCount() const;
unsigned GetReadMessageCallCount() const;
unsigned GetWriteDataCallCount() const;
@@ -88,6 +90,7 @@ class CoreTestBase_MockHandleInfo {
void IncrementCtorCallCount();
void IncrementDtorCallCount();
void IncrementCloseCallCount();
+ void IncrementDuplicateDispatcherCallCount();
void IncrementWriteMessageCallCount();
void IncrementReadMessageCallCount();
void IncrementWriteDataCallCount();
@@ -112,6 +115,7 @@ class CoreTestBase_MockHandleInfo {
unsigned ctor_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
unsigned dtor_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
unsigned close_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
+ unsigned duplicate_dispatcher_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
unsigned write_message_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
unsigned read_message_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
unsigned write_data_call_count_ MOJO_GUARDED_BY(mutex_) = 0;
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/core_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698