| Index: chrome_frame/test/chrome_frame_test_utils.h
|
| diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h
|
| index 8affbd56431ce148784bc06078eb508b7923ff18..17f06ed2ff28c13eb0e1ef40f6e31510177ed314 100644
|
| --- a/chrome_frame/test/chrome_frame_test_utils.h
|
| +++ b/chrome_frame/test/chrome_frame_test_utils.h
|
| @@ -13,6 +13,7 @@
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/cancelable_callback.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop.h"
|
| @@ -195,6 +196,7 @@ class TimedMsgLoop {
|
| QuitAfter(seconds);
|
| quit_loop_invoked_ = false;
|
| loop_.MessageLoop::Run();
|
| + quit_closure_.Cancel();
|
| }
|
|
|
| void PostTask(const tracked_objects::Location& from_here,
|
| @@ -212,17 +214,23 @@ class TimedMsgLoop {
|
| }
|
|
|
| void QuitAfter(int seconds) {
|
| + quit_closure_.Reset(MessageLoop::QuitClosure());
|
| quit_loop_invoked_ = true;
|
| loop_.PostDelayedTask(
|
| - FROM_HERE, MessageLoop::QuitClosure(), 1000 * seconds);
|
| + FROM_HERE, quit_closure_.callback(), 1000 * seconds);
|
| }
|
|
|
| bool WasTimedOut() const {
|
| return !quit_loop_invoked_;
|
| }
|
|
|
| + void RunAllPending() {
|
| + loop_.RunAllPending();
|
| + }
|
| +
|
| private:
|
| MessageLoopForUI loop_;
|
| + base::CancelableClosure quit_closure_;
|
| bool quit_loop_invoked_;
|
| };
|
|
|
|
|