| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "base/mac/scoped_sending_event.h" | 5 #import "base/mac/scoped_sending_event.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 @interface ScopedSendingEventTestCrApp : NSApplication <CrAppControlProtocol> { | 12 @interface ScopedSendingEventTestCrApp : NSApplication <CrAppControlProtocol> { |
| 13 @private | 13 @private |
| 14 BOOL handlingSendEvent_; | 14 BOOL handlingSendEvent_; |
| 15 } | 15 } |
| 16 @property(nonatomic, assign, getter=isHandlingSendEvent) BOOL handlingSendEvent; | 16 @property(nonatomic, assign, getter=isHandlingSendEvent) BOOL handlingSendEvent; |
| 17 @end | 17 @end |
| 18 | 18 |
| 19 @implementation ScopedSendingEventTestCrApp | 19 @implementation ScopedSendingEventTestCrApp |
| 20 @synthesize handlingSendEvent = handlingSendEvent_; | 20 @synthesize handlingSendEvent = handlingSendEvent_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { | 54 { |
| 55 base::mac::ScopedSendingEvent nested_is_handling_send_event; | 55 base::mac::ScopedSendingEvent nested_is_handling_send_event; |
| 56 EXPECT_TRUE([app isHandlingSendEvent]); | 56 EXPECT_TRUE([app isHandlingSendEvent]); |
| 57 } | 57 } |
| 58 EXPECT_TRUE([app isHandlingSendEvent]); | 58 EXPECT_TRUE([app isHandlingSendEvent]); |
| 59 } | 59 } |
| 60 EXPECT_FALSE([app isHandlingSendEvent]); | 60 EXPECT_FALSE([app isHandlingSendEvent]); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace | 63 } // namespace |
| OLD | NEW |