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

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

Issue 798993003: Add embedder::AsyncWait() (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Updated Created 6 years 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: 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 80a926b6ddc18e2acdc9fd513de8572a0bc16a27..68b6e820e9e652b2dc9ab145f5f22292e796f5f9 100644
--- a/mojo/edk/system/core_test_base.h
+++ b/mojo/edk/system/core_test_base.h
@@ -15,6 +15,7 @@ namespace mojo {
namespace system {
class Core;
+class Awakable;
namespace test {
@@ -62,6 +63,9 @@ class CoreTestBase_MockHandleInfo {
unsigned GetRemoveAwakableCallCount() const;
unsigned GetCancelAllAwakablesCallCount() const;
+ unsigned GetAddedAwakableSize() const;
+ Awakable* GetAddedAwakableAt(unsigned i) const;
+
// For use by |MockDispatcher|:
void IncrementCtorCallCount();
void IncrementDtorCallCount();
@@ -78,6 +82,10 @@ class CoreTestBase_MockHandleInfo {
void IncrementRemoveAwakableCallCount();
void IncrementCancelAllAwakablesCallCount();
+ void AllowAddAwakable(bool alllow);
+ bool IsAddAwakableAllowed() const;
+ void AwakableWasAdded(Awakable*);
+
private:
mutable base::Lock lock_; // Protects the following members.
unsigned ctor_call_count_;
@@ -95,6 +103,9 @@ class CoreTestBase_MockHandleInfo {
unsigned remove_awakable_call_count_;
unsigned cancel_all_awakables_call_count_;
+ bool add_awakable_allowed_;
+ std::vector<Awakable*> added_awakables_;
+
DISALLOW_COPY_AND_ASSIGN(CoreTestBase_MockHandleInfo);
};

Powered by Google App Engine
This is Rietveld 408576698