| Index: ui/base/test/scoped_fake_nswindow_fullscreen.mm
|
| diff --git a/ui/base/test/scoped_fake_nswindow_fullscreen.mm b/ui/base/test/scoped_fake_nswindow_fullscreen.mm
|
| index 1fcd8949b61477e13f8684b6b1548902532d31d2..0dc9db7d262c699dba8bde548c3392d8520d37ea 100644
|
| --- a/ui/base/test/scoped_fake_nswindow_fullscreen.mm
|
| +++ b/ui/base/test/scoped_fake_nswindow_fullscreen.mm
|
| @@ -14,6 +14,7 @@
|
| #import "base/mac/sdk_forward_declarations.h"
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
|
|
| // This method exists on NSWindowDelegate on 10.7+.
|
| // To build on 10.6, we just need to declare it somewhere. We'll test
|
| @@ -175,6 +176,8 @@ class ScopedFakeNSWindowFullscreen::Impl {
|
| style_as_fullscreen_ = false;
|
| }
|
|
|
| + bool is_in_transition() { return is_in_transition_; }
|
| +
|
| private:
|
| base::mac::ScopedObjCClassSwizzler toggle_fullscreen_swizzler_;
|
| base::mac::ScopedObjCClassSwizzler style_mask_swizzler_;
|
| @@ -205,6 +208,13 @@ ScopedFakeNSWindowFullscreen::~ScopedFakeNSWindowFullscreen() {
|
| g_fake_fullscreen_impl = nullptr;
|
| }
|
|
|
| +void ScopedFakeNSWindowFullscreen::FinishTransition() {
|
| + if (impl_->is_in_transition())
|
| + base::RunLoop().RunUntilIdle();
|
| +
|
| + DCHECK(!impl_->is_in_transition());
|
| +}
|
| +
|
| } // namespace test
|
| } // namespace ui
|
|
|
|
|