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

Unified Diff: mojo/edk/test/mojo_test_base.h

Issue 2741033003: Mojo EDK: Introduce MojoQueryHandleSignalsState API (Closed)
Patch Set: fix stupid bad DCHECK Created 3 years, 9 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/signals_unittest.cc ('k') | mojo/edk/test/mojo_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/test/mojo_test_base.h
diff --git a/mojo/edk/test/mojo_test_base.h b/mojo/edk/test/mojo_test_base.h
index fa5b64ced93a1d497017a8fa6d551ffe1de4eac0..35e2c2b12f9986b85a99daade269382eb713789c 100644
--- a/mojo/edk/test/mojo_test_base.h
+++ b/mojo/edk/test/mojo_test_base.h
@@ -30,8 +30,6 @@ class MojoTestBase : public testing::Test {
~MojoTestBase() override;
using LaunchType = MultiprocessTestHelper::LaunchType;
-
- protected:
using HandlerCallback = base::Callback<void(ScopedMessagePipeHandle)>;
class ClientController {
@@ -152,6 +150,14 @@ class MojoTestBase : public testing::Test {
// Reads data from a data pipe.
static std::string ReadData(MojoHandle consumer, size_t size);
+ // Queries the signals state of |handle|.
+ static MojoHandleSignalsState GetSignalsState(MojoHandle handle);
+
+ // Helper to block the calling thread waiting for signals to be raised.
+ static MojoResult WaitForSignals(MojoHandle handle,
+ MojoHandleSignals signals,
+ MojoHandleSignalsState* state = nullptr);
+
void set_launch_type(LaunchType launch_type) { launch_type_ = launch_type; }
private:
« no previous file with comments | « mojo/edk/system/signals_unittest.cc ('k') | mojo/edk/test/mojo_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698